-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (31 loc) · 966 Bytes
/
promote-to-stable.yml
File metadata and controls
38 lines (31 loc) · 966 Bytes
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
name: Promote Image to Stable
on:
workflow_dispatch:
inputs:
version:
description: "Image tag to promote to stable"
required: true
push:
branches:
- bootstrapper-issue-364
jobs:
promote:
runs-on: ubuntu-latest
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_PAT }}
- name: Retag image as stable
run: |
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/ziti-browzer-bootstrapper
VERSION=${{ github.event.inputs.version }}
# Pull the existing image
docker pull $IMAGE_NAME:$VERSION
# Retag it as "stable"
docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:stable
# Push both tags
docker push $IMAGE_NAME:$VERSION
docker push $IMAGE_NAME:stable