Skip to content

Commit aecf98a

Browse files
committed
🔒 👽 Remove compromized GitHub Action
1 parent 0a0066f commit aecf98a

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

.github/workflows/on_push.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,51 +35,42 @@ jobs:
3535
uses: actions/checkout@v4
3636
with:
3737
fetch-depth: 2
38-
- name: Get changed files since last commit
39-
uses: tj-actions/[email protected]
40-
id: changed-files
41-
with:
42-
since_last_remote_commit: "true"
43-
files: .github/Dockerfiles/*
44-
json: "true"
4538
- name: Determine stages to rebuild
4639
env:
4740
MESSAGE: ${{ github.event.head_commit.message }}
4841
id: rebuild
4942
run: |
5043
# initialize phase arrays
5144
declare -a PHASE_ONE PHASE_TWO PHASE_THREE REBUILD_PHASE_ONE REBUILD_PHASE_TWO REBUILD_PHASE_THREE
52-
# turn JSON array into BASH array
53-
CHANGED_FILES=( $(echo ${{ steps.changed-files.outputs.all_changed_files }} | sed -e 's/\[//g' -e 's/\]//g' -e 's/\,/ /g') )
5445
# loop through stages to maybe rebuild
5546
for STAGE in $(cat ${GITHUB_WORKSPACE}/.github/stage_requirements/phase_one.txt)
5647
do
5748
PHASE_ONE+=($STAGE)
5849
# check commit message for [rebuild STAGE] or if STAGE has changed
59-
if [[ "${MESSAGE}" == *"[rebuild ${STAGE}]"* ]] || [[ " ${CHANGED_FILES[*]} " =~ " ${STAGE} " ]]
50+
if [[ "${MESSAGE}" == *"[rebuild ${STAGE}]"* ]]
6051
then
6152
REBUILD_PHASE_ONE+=($STAGE)
6253
fi
6354
done
6455
for STAGE in $(cat ${GITHUB_WORKSPACE}/.github/stage_requirements/phase_two.txt)
6556
do
6657
PHASE_TWO+=($STAGE)
67-
if [[ "${MESSAGE}" == *"[rebuild ${STAGE}]"* ]] || [[ " ${CHANGED_FILES[*]} " =~ " ${STAGE} " ]]
58+
if [[ "${MESSAGE}" == *"[rebuild ${STAGE}]"* ]]
6859
then
6960
REBUILD_PHASE_TWO+=($STAGE)
7061
fi
7162
done
7263
for STAGE in $(cat ${GITHUB_WORKSPACE}/.github/stage_requirements/phase_three.txt)
7364
do
7465
PHASE_THREE+=($STAGE)
75-
if [[ "${MESSAGE}" == *"[rebuild ${STAGE}]"* ]] || [[ "${MESSAGE}" == *"[rebuild base-${STAGE}]"* ]] || [[ " ${CHANGED_FILES[*]} " =~ " ${STAGE} " ]]
66+
if [[ "${MESSAGE}" == *"[rebuild ${STAGE}]"* ]] || [[ "${MESSAGE}" == *"[rebuild base-${STAGE}]"* ]]
7667
then
7768
REBUILD_PHASE_THREE+=($STAGE)
7869
fi
7970
done
8071
# add base stages based on their dependencies
8172
BASES=("${PHASE_THREE[@]}" standard)
82-
if [[ "${MESSAGE}" == *"[rebuild standard]"* ]] || [[ "${MESSAGE}" == *"[rebuild base-standard]"* ]] || [[ " ${CHANGED_FILES[*]} " =~ " standard " ]]
73+
if [[ "${MESSAGE}" == *"[rebuild standard]"* ]] || [[ "${MESSAGE}" == *"[rebuild base-standard]"* ]]
8374
then
8475
REBUILD_PHASE_THREE+=(standard)
8576
fi

0 commit comments

Comments
 (0)