Skip to content

Commit

Permalink
GHA: Remove {pre,post}-action steps for self-hosted runners
Browse files Browse the repository at this point in the history
The following hooks:

- ACTIONS_RUNNER_HOOK_JOB_STARTED
- ACTIONS_RUNNER_HOOK_JOB_COMPLETED

could perfectly replace the existing {pre,post}-action scripts
and will make a workflow independent of the runner context.
This commit wipes out all GHA steps where the actions are triggered.

Signed-off-by: Hyounggyu Choi <[email protected]>
  • Loading branch information
BbolroC committed Jul 31, 2024
1 parent 51e9670 commit cf08968
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 52 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/aa_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ jobs:
with:
fetch-depth: 1

- name: Take a pre-action for self-hosted runner
run: |
if [ -f "${HOME}/script/pre_action.sh" ]; then
"${HOME}/script/pre_action.sh" cc-guest-components
fi
- name: Install Rust toolchain (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -119,10 +113,3 @@ jobs:
command: clippy
# We are getting error in generated code due to derive_partial_eq_without_eq check, so ignore it for now
args: ${{ matrix.cargo_lint_opts }} -- -D warnings -A clippy::derive-partial-eq-without-eq

- name: Take a post-action for self-hosted runner
if: always()
run: |
if [ -f ${HOME}/script/post_action.sh ]; then
${HOME}/script/post_action.sh cc-guest-components
fi
13 changes: 0 additions & 13 deletions .github/workflows/api-server-rest-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ jobs:
with:
fetch-depth: 1

- name: Take a pre-action for self-hosted runner
run: |
if [ -f "${HOME}/script/pre_action.sh" ]; then
"${HOME}/script/pre_action.sh" cc-guest-components
fi
- name: Install Rust toolchain (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -76,10 +70,3 @@ jobs:
with:
command: test
args: -p api-server-rest

- name: Take a post-action for self-hosted runner
if: always()
run: |
if [ -f ${HOME}/script/post_action.sh ]; then
${HOME}/script/post_action.sh cc-guest-components
fi
13 changes: 0 additions & 13 deletions .github/workflows/cdh_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ jobs:
with:
fetch-depth: 1

- name: Take a pre-action for self-hosted runner
run: |
if [ -f "${HOME}/script/pre_action.sh" ]; then
"${HOME}/script/pre_action.sh" cc-guest-components
fi
- name: Install Rust toolchain (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -89,10 +83,3 @@ jobs:
command: clippy
# We are getting error in generated code due to derive_partial_eq_without_eq check, so ignore it for now
args: -p kms -p confidential-data-hub -p secret -p image -- -D warnings -A clippy::derive-partial-eq-without-eq

- name: Take a post-action for self-hosted runner
if: always()
run: |
if [ -f ${HOME}/script/post_action.sh ]; then
${HOME}/script/post_action.sh cc-guest-components
fi
13 changes: 0 additions & 13 deletions .github/workflows/image_rs_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ jobs:
with:
fetch-depth: 1

- name: Take a pre-action for self-hosted runner
run: |
if [ -f "${HOME}/script/pre_action.sh" ]; then
"${HOME}/script/pre_action.sh" cc-guest-components
fi
- name: Install Rust toolchain (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -151,10 +145,3 @@ jobs:
run: |
sudo -E PATH=$PATH -s cargo test -p image-rs --no-default-features --features=kata-cc-native-tls,keywrap-jwe,nydus
if: matrix.instance == 'ubuntu-latest'

- name: Take a post-action for self-hosted runner
if: always()
run: |
if [ -f ${HOME}/script/post_action.sh ]; then
${HOME}/script/post_action.sh cc-guest-components
fi

0 comments on commit cf08968

Please sign in to comment.