Skip to content

Commit a9bc0fa

Browse files
committed
chore: tag-specific workflow
1 parent 09c9d56 commit a9bc0fa

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/release-tag.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release (tag)
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-22.04
12+
13+
steps:
14+
- name: Checkout
15+
id: checkout
16+
# from https://github.com/actions/checkout/commits/main
17+
uses: actions/checkout@1f9a0c22da41e6ebfa534300ef656657ea2c6707
18+
with:
19+
persist-credentials: false
20+
fetch-depth: 0
21+
22+
- name: Log in to the Container registry
23+
id: docker_login
24+
# from https://github.com/docker/login-action/commits/master
25+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
26+
with:
27+
registry: ghcr.io
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Build and push Docker image
32+
id: docker_build_push
33+
# from https://github.com/docker/build-push-action/commits/master
34+
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
35+
with:
36+
context: .
37+
push: true
38+
tags: |
39+
ghcr.io/${{ github.repository }}:latest
40+
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
41+
labels: |
42+
maintainer=https://pagopa.it
43+
org.opencontainers.image.source=https://github.com/${{ github.repository }}

0 commit comments

Comments
 (0)