File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 9
9
concurrency :
10
10
group : ${{ github.workflow }}
11
11
12
+ permissions :
13
+ packages : write
14
+
12
15
jobs :
13
16
cleanup-container-tags :
14
17
runs-on : ubuntu-latest
@@ -36,14 +39,15 @@ jobs:
36
39
registry : ghcr.io/${{ github.repository_owner }}
37
40
- name : Get list of tags
38
41
run : |
39
- skopeo list-tags docker://${{ github.repository }} | jq --raw-output '.Tags[]' > tags
42
+ set -euo pipefail # Fail pipe if any command fails
43
+ skopeo list-tags docker://ghcr.io/${{ github.repository }} | jq --raw-output '.Tags[]' > tags
40
44
- name : Get latest release and rc tags
41
45
run : |
42
46
STABLE_TAG="$(grep -P '^v\d+\.\d+\.\d+$' tags | sort -rV | head -n1)"
43
- echo "STABLE_TAG =${STABLE_TAG:-v0.0.0}" >> $GITHUB_ENV
47
+ echo "stable_tag =${STABLE_TAG:-v0.0.0}" >> $GITHUB_ENV
44
48
LATEST_TAG="$(grep -P '^v\d+\.\d+\.\d+' tags | sort -rV | head -n1)"
45
- echo "LATEST_TAG =${LATEST_TAG:-v0.0.0}" >> $GITHUB_ENV
49
+ echo "latest_tag =${LATEST_TAG:-v0.0.0}" >> $GITHUB_ENV
46
50
- name : Update latest and stable tags
47
51
run : |
48
- skopeo copy docker://${{ github.repository }}:${{ env.stable_tag }} docker://${{ github.repository }}:stable
49
- skopeo copy docker://${{ github.repository }}:${{ env.latest_tag }} docker://${{ github.repository }}:latest
52
+ skopeo copy docker://ghcr.io/ ${{ github.repository }}:${{ env.stable_tag }} docker://ghcr.io /${{ github.repository }}:stable
53
+ skopeo copy docker://ghcr.io/ ${{ github.repository }}:${{ env.latest_tag }} docker://ghcr.io /${{ github.repository }}:latest
You can’t perform that action at this time.
0 commit comments