-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (38 loc) · 1.24 KB
/
tag-prod-image.yaml
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
---
name: Tag production image
on:
push:
tags:
- "*"
jobs:
tagProdVersion:
runs-on: ubuntu-latest
name: "Push semver-tagged image to registry and notify sentry of release"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: pull current image
run: |
docker pull ghcr.io/lotta-schule/core:$GITHUB_SHA
- name: push tagged image
run: |
docker tag ghcr.io/lotta-schule/core:$GITHUB_SHA ghcr.io/lotta-schule/core:$GITHUB_REF_NAME
docker tag ghcr.io/lotta-schule/core:$GITHUB_SHA ghcr.io/lotta-schule/core:latest
docker push ghcr.io/lotta-schule/core:$GITHUB_REF_NAME
docker push ghcr.io/lotta-schule/core:latest
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: core
with:
environment: production
version: ${{ github.ref_name }}