Skip to content

Commit

Permalink
should now checkout branches correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
wtripp180901 committed Dec 20, 2024
1 parent a59e6f7 commit 57e2d7f
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/update-timestamps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,31 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Check automation branch exists
id: auto-branch-check
run: |
git fetch
branches=$(git branch -r)
set +e
echo $branches | grep auto/bump-timestamps
echo "branch_exists=$?" >> "$GITHUB_OUTPUT"
- name: Create automation branch
if: ${{ steps.auto-branch-check.outputs.branch_exists }} == 1
run: |
git checkout -b auto/bump-timestamps
git config --global --add --bool push.autoSetupRemote true
git push
- uses: actions/checkout@v2
with:
ref: auto/bump-timestamps

- name: Check for updated Ark timestamps and replace in defaults.yml
run: |
dev/setup-env.sh
. venv/bin/activate
. environments/.stackhpc/activate
git checkout auto/bump-timestamps || git checkout -b auto/bump-timestamps
git pull origin auto/bump-timestamps
ansible-playbook ansible/ci/update_timestamps.yml -v
- name: Check if timestamps were changed
Expand Down Expand Up @@ -56,6 +74,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: auto/bump-timestamps

- name: Bump CI with new images
run: |
Expand Down

0 comments on commit 57e2d7f

Please sign in to comment.