This commit is contained in:
Joseph Garrone 2020-05-14 05:57:01 +02:00
parent d33f250503
commit 1c29eebc74

View file

@ -44,6 +44,8 @@ jobs:
owner: ${{github.repository_owner}} owner: ${{github.repository_owner}}
repo: ${{github.event.repository.name}} repo: ${{github.event.repository.name}}
branch: latest branch: latest
compare_to_version: '0.0.0'
- name: Get version on master - name: Get version on master
id: v_master id: v_master
@ -53,9 +55,10 @@ jobs:
owner: ${{github.repository_owner}} owner: ${{github.repository_owner}}
repo: ${{github.event.repository.name}} repo: ${{github.event.repository.name}}
branch: ${{ github.sha }} branch: ${{ github.sha }}
compare_to_version: ${{steps.v_latest.outputs.version}}
- name: 'Trigger the ''publish'' workflow' - name: 'Trigger the ''publish'' workflow if newer version'
if: ${{ !!env.PAT && steps.v_latest.outputs.version != steps.v_master.outputs.version && steps.v_master.outputs.version != '0.0.0' }} if: ${{ !!env.PAT && steps.v_master.outputs.compare_result == '1' }}
uses: garronej/github_actions_toolkit@master uses: garronej/github_actions_toolkit@master
env: env:
GITHUB_TOKEN: ${{ secrets.PAT }} GITHUB_TOKEN: ${{ secrets.PAT }}