-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.33 KB
/
docker.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
name: Create and publish Docker image
on:
push:
branches:
- 'main'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
call_build-and-push-image_latest:
if: startsWith(github.ref, 'refs/heads/')
permissions:
contents: read
packages: write
uses: eurofurence/reg-workflows/.github/workflows/docker-build-push.yml@main
with:
image-name: ${{ github.repository }}
image-tags: latest
full-repo-url: https://github.com/${{ github.repository }}
branch-or-tag-name: ${{ github.ref_name }}
commit-hash: ${{ github.sha }}
registry-user: ${{ github.actor }}
secrets:
registry-pass: ${{ secrets.GITHUB_TOKEN }}
call_build-and-push-image_versioned:
if: startsWith(github.ref, 'refs/tags/v0.1.')
permissions:
contents: read
packages: write
uses: eurofurence/reg-workflows/.github/workflows/docker-build-push.yml@main
with:
image-name: ${{ github.repository }}
image-tags: ${{ github.ref_name }} v0.1
full-repo-url: https://github.com/${{ github.repository }}
branch-or-tag-name: ${{ github.ref_name }}
commit-hash: ${{ github.sha }}
registry-user: ${{ github.actor }}
secrets:
registry-pass: ${{ secrets.GITHUB_TOKEN }}