Skip to content

Commit

Permalink
use github.event.release.target_commitish == master
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamasato authored Aug 5, 2020
1 parent 6a0e007 commit 7f476d2
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/released.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,8 @@ on:
types: [released]

jobs:
check-tag-branch:
runs-on: ubuntu-latest
steps:
- name: get tag commit hash
id: tag-commit-hash
run: echo "::set-output name=tag-hash::${{ github.sha }}"
- name: checkout master
uses: actions/checkout@v2
with:
ref: master
- name: get latest master commit hash
id: master-commit-hash
run: |
hash=$(git log -n1 --format=format:"%H")
echo "::set-output name=master-hash::${hash}"
- name: exit if tag commit hash doesn't match with the master commit hash
if: steps.tag-commit-hash.outputs.tag-hash != steps.master-commit-hash.outputs.master-hash
run: exit 1
deploy:
needs: check-tag-branch
if: github.event.release.target_commitish == 'master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down

0 comments on commit 7f476d2

Please sign in to comment.