-
-
Notifications
You must be signed in to change notification settings - Fork 186
58 lines (50 loc) · 2.21 KB
/
docker-update-stable.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
47
48
49
50
51
52
53
54
55
56
57
58
---
name: Docker update stable tag
# Links/updates stable docker tags to specified version.
# This should be used after building a specific tagged image e.g. `:v0.7.2`.
#
# dolfinx/dolfinx:stable
# dolfinx/lab:stable
# dolfinx/dev-env:stable
# dolfinx/dolfinx-onbuild:stable
on:
workflow_dispatch:
inputs:
tag:
description: "link stable to tag"
type: string
required: true
jobs:
update_stable_tag:
name: Update stable tags
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install regclient
run: |
wget -O regctl https://github.com/regclient/regclient/releases/download/v0.5.4/regctl-linux-amd64
chmod +x regctl
- name: Link supplied tag to stable on docker.io
run: |
regctl image copy dolfinx/dolfinx:${{ github.event.input.tag }} dolfinx/dolfinx:stable
regctl image copy dolfinx/lab:${{ github.event.input.tag }} dolfinx/lab:stable
regctl image copy dolfinx/dev-env:${{ github.event.input.tag }} dolfinx/dev-env:stable
regctl image copy dolfinx/dolfinx-onbuild:${{ github.event.input.tag }} dolfinx/dolfinx-onbuild:stable
- name: Link supplied tag to stable on ghcr.io
run: |
regctl image copy ghcr.io/fenics/dolfinx/dolfinx:${{ github.event.input.tag }} ghcr.io/fenics/dolfinx/dolfinx:stable
regctl image copy ghcr.io/fenics/dolfinx/lab:${{ github.event.input.tag }} ghcr.io/fenics/dolfinx/lab:stable
regctl image copy ghcr.io/fenics/dolfinx/dev-env:${{ github.event.input.tag }} ghcr.io/fenics/dolfinx/dev-env:stable
regctl image copy ghcr.io/dolfinx/dolfinx-onbuild:${{ github.event.input.tag }} ghcr.io/fenics/dolfinx/dolfinx-onbuild:stable