Skip to content

Commit

Permalink
add a git_ref validation job
Browse files Browse the repository at this point in the history
  • Loading branch information
momentmaker committed Aug 6, 2024
1 parent c5390a5 commit 1e3222f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/build-publish-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,21 @@ env:
GIT_REF: ${{ github.event.inputs.git_ref || github.ref }}

jobs:
validate-git-ref:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Validate GIT_REF
run: |
if ! git rev-parse --verify "${{ env.GIT_REF }}" > /dev/null 2>&1; then
echo "Invalid GIT_REF: ${{ env.GIT_REF }}"
exit 1
fi
goreleaser-build-publish-chainlink:
needs: [validate-git-ref]
runs-on:
labels: ubuntu22.04-16cores-64GB
environment: build-develop
Expand All @@ -37,7 +51,7 @@ jobs:
role-duration-seconds: ${{ secrets.AWS_ROLE_DURATION_SECONDS }}
aws-region: ${{ secrets.AWS_REGION }}
mask-aws-account-id: true
role-session-name: build-publish-chainlink-develop
role-session-name: goreleaser-build-publish-chainlink

- name: Build, sign, and publish image
id: goreleaser-build-publish
Expand Down

0 comments on commit 1e3222f

Please sign in to comment.