Skip to content

Commit

Permalink
removed redundant checks and made is_callee checking clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
wtripp180901 committed Jan 13, 2025
1 parent 433a9ca commit 7e8fd62
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/actions/is_callee/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ runs:
if echo ${{ github.workflow_ref }} | grep ${{ inputs.current_workflow_file }}; then
echo "is_callee='false'" >> "$GITHUB_OUTPUT"
else
echo "is_callee='true'" >> "$GITHUB_OUTPUT"
echo "is_callee=true" >> "$GITHUB_OUTPUT"
fi
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/fatimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
env:
ANSIBLE_FORCE_COLOR: True
OS_CLOUD: openstack
CI_CLOUD: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ci_cloud || inputs.ci_cloud_override }}
CI_CLOUD: ${{ github.event.inputs.ci_cloud || inputs.ci_cloud_override }}
ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }}
LEAFCLOUD_PULP_PASSWORD: ${{ secrets.LEAFCLOUD_PULP_PASSWORD }}
outputs:
Expand All @@ -61,7 +61,7 @@ jobs:

- uses: actions/checkout@v3
with:
ref: ${{ steps.callee_check.outputs.is_callee && inputs.target_branch || github.ref }}
ref: ${{ steps.callee_check.outputs.is_callee == 'true' && inputs.target_branch || github.ref }}

- name: Record settings for CI cloud
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stackhpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

- uses: actions/checkout@v3
with:
ref: ${{ steps.callee_check.outputs.is_callee && inputs.target_branch || github.ref }}
ref: ${{ steps.callee_check.outputs.is_callee == 'true' && inputs.target_branch || github.ref }}

- name: Override CI_CLOUD if PR label is present
if: ${{ github.event_name == 'pull_request' }}
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/update-timestamps.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Check for new Release Train snapshots
on:
workflow_dispatch: # temporary, doesn't support workflow_dispatch due to issues with CI_CLOUD in fatimage
workflow_dispatch: # temporary
pull_request: #temporary
schedule:
- cron: '0 7 * * *' # Run at 7am on default branch
Expand All @@ -13,6 +13,18 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: stackhpc/ansible-slurm-appliance/.github/actions/is_callee@feat/auto-bump-timestamps # todo: change to main once merges
id: callee_check
with:
current_workflow_file: stackhpc.yml

- name: test
run: echo ${{ steps.callee_check.outputs.is_callee }}

- uses: actions/checkout@v3
with:
ref: ${{ steps.callee_check.outputs.is_callee == 'true' && 'works' }}

- name: Check automation branch exists
id: auto-branch-check
run: |
Expand Down

0 comments on commit 7e8fd62

Please sign in to comment.