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 99concurrency :
1010 group : ${{ github.workflow }}
1111
12+ permissions :
13+ packages : write
14+
1215jobs :
1316 cleanup-container-tags :
1417 runs-on : ubuntu-latest
@@ -36,14 +39,15 @@ jobs:
3639 registry : ghcr.io/${{ github.repository_owner }}
3740 - name : Get list of tags
3841 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
4044 - name : Get latest release and rc tags
4145 run : |
4246 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
4448 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
4650 - name : Update latest and stable tags
4751 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