Skip to content

Commit

Permalink
Use head.sha, not github.sha to reference current commit of PR (#50)
Browse files Browse the repository at this point in the history
Use head.sha, not github.sha to reference current commit of PR
  • Loading branch information
JoshuaCWebDeveloper committed Nov 16, 2022
1 parent f39cc47 commit 564dcd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
docker buildx build \
--cache-from type=registry,ref=ghcr.io/samizdapp/athena:${{ github.event.before }} \
--cache-from type=registry,ref=ghcr.io/samizdapp/athena:develop \
--tag ghcr.io/samizdapp/athena:${{ github.sha }} \
--tag ghcr.io/samizdapp/athena:${{ github.event.pull_request.head.sha }} \
--push \
.
- name: Build and export validate image
Expand All @@ -34,5 +34,5 @@ runs:
mkdir -p /tmp/images
docker build . \
-f .github/workflows/validate.Dockerfile \
--build-arg VERSION=${{ github.sha }} \
--tag ghcr.io/samizdapp/athena-validate:${{ github.sha }}
--build-arg VERSION=${{ github.event.pull_request.head.sha }} \
--tag ghcr.io/samizdapp/athena-validate:${{ github.event.pull_request.head.sha }}
8 changes: 4 additions & 4 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
docker run \
--rm \
--entrypoint npm \
ghcr.io/samizdapp/athena-validate:${{ github.sha }} \
ghcr.io/samizdapp/athena-validate:${{ github.event.pull_request.head.sha }} \
run nx -- format:check --base=${{ github.event.pull_request.base.sha }}
lint:
Expand All @@ -59,7 +59,7 @@ jobs:
docker run \
--rm \
--entrypoint npm \
ghcr.io/samizdapp/athena-validate:${{ github.sha }} \
ghcr.io/samizdapp/athena-validate:${{ github.event.pull_request.head.sha }} \
run nx -- affected --target=lint --base=${{ github.event.pull_request.base.sha }} --max-warnings=0
# This workflow contains a single job called "build"
Expand All @@ -84,7 +84,7 @@ jobs:
docker run \
--rm \
--entrypoint npm \
ghcr.io/samizdapp/athena-validate:${{ github.sha }} \
ghcr.io/samizdapp/athena-validate:${{ github.event.pull_request.head.sha }} \
run nx -- affected --target=build --base=${{ github.event.pull_request.base.sha }}
test:
Expand All @@ -108,5 +108,5 @@ jobs:
docker run \
--rm \
--entrypoint npm \
ghcr.io/samizdapp/athena-validate:${{ github.sha }} \
ghcr.io/samizdapp/athena-validate:${{ github.event.pull_request.head.sha }} \
run nx -- affected --target=test --base=${{ github.event.pull_request.base.sha }}

0 comments on commit 564dcd6

Please sign in to comment.