Skip to content

Commit 3fdbb86

Browse files
author
Alexander Bainczyk
committed
ci: add release job to tag docker images
1 parent c8e7359 commit 3fdbb86

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,31 @@ jobs:
1212

1313
- uses: actions/setup-node@v1
1414
with:
15-
node-version: 12
15+
node-version: 14
1616
registry-url: https://registry.npmjs.org/
1717
- run: cd cli
1818
- run: npm ci
1919
- run: npm publish
2020
env:
21-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
21+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
22+
23+
tag-docker-images:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Login to GitHub Container Registry
27+
run: echo "${{ inputs.password }}" | docker login https://ghcr.io -u ${{ inputs.username }} --password-stdin
28+
29+
- name: Tag latest images with release version
30+
run: |
31+
VERSION="2.1.0"
32+
IMAGES="alex-frontend alex-backend alex-cli alex-docs"
33+
34+
for img in $IMAGES
35+
do
36+
echo "ghcr.io/learnlib/alex/$img:$VERSION"
37+
docker pull "ghcr.io/learnlib/alex/$img:unstable"
38+
docker tag "ghcr.io/learnlib/alex/$img:unstable" "ghcr.io/learnlib/alex/$img:$VERSION"
39+
docker tag "ghcr.io/learnlib/alex/$img:unstable" "ghcr.io/learnlib/alex/$img:latest"
40+
docker push "ghcr.io/learnlib/alex/$img:$VERSION"
41+
docker push "ghcr.io/learnlib/alex/$img:latest"
42+
done

0 commit comments

Comments
 (0)