Skip to content

Commit

Permalink
[GitHub Action] Override GITHUB_SHA if event_name is pull_request
Browse files Browse the repository at this point in the history
  • Loading branch information
norio-nomura committed Sep 15, 2019
1 parent 960263f commit 5a26afc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,23 @@ jobs:
uses: docker://replicated/dockerfilelint
with:
args: Dockerfile
- name: swift test
- name: swift test on push
if: github.event_name == 'push'
uses: docker://norionomura/swiftlint:swift-5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
entrypoint: swift
args: test
- name: swift test on pull_request
if: github.event_name == 'pull_request' && contains('opened synchronize reopened', github.event.action)
uses: docker://norionomura/swiftlint:swift-5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SHA: ${{ github.event.pull_request.head.sha }}
with:
entrypoint: swift
args: test
- name: Docker Build
uses: actions/docker/cli@master
with:
Expand Down

0 comments on commit 5a26afc

Please sign in to comment.