-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.2 KB
/
tag.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Tag
on:
push:
branches: [ main ]
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check version change
id: check
uses: EndBug/version-check@v2
- name: Create tag
if: steps.check.outputs.changed == 'true'
uses: tvdias/github-tagger@v0.0.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.check.outputs.version }}
- name: Trigger Docker workflow
if: steps.check.outputs.changed == 'true'
uses: actions/github-script@v7
with:
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'docker.yml',
ref: '${{ steps.check.outputs.version }}'
})
- name: Trigger Release workflow
if: steps.check.outputs.changed == 'true'
uses: actions/github-script@v7
with:
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'create-release.yml',
ref: '${{ steps.check.outputs.version }}'
})