-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 1.11 KB
/
production.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
name: Publish on GHCR
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Logging into docker registry
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin registry.bleumatin.fr
- name: Pulling image
run: docker pull registry.bleumatin.fr/talm/scrrap-lab:${GITHUB_SHA}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tagging to version
run: |
docker image tag registry.bleumatin.fr/talm/scrrap-lab:${GITHUB_SHA} ghcr.io/bleumatin-fr/scrrap-lab:${GITHUB_REF#refs/tags/}
docker image tag registry.bleumatin.fr/talm/scrrap-lab:${GITHUB_SHA} ghcr.io/bleumatin-fr/scrrap-lab:latest
- name: Pushing to GitHub Container Registry
run: docker push --all-tags ghcr.io/bleumatin-fr/scrrap-lab
# - name: Restarting
# run: