File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
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,13 +39,15 @@ jobs:
36
39
registry : ghcr.io/${{ github.repository_owner }}
37
40
- name : Get list of tags
38
41
run : |
42
+ # Fail step if any command fails
43
+ set -euo pipefail
39
44
skopeo list-tags docker://${{ github.repository }} | jq --raw-output '.Tags[]' > tags
40
45
- name : Get latest release and rc tags
41
46
run : |
42
47
STABLE_TAG="$(grep -P '^v\d+\.\d+\.\d+$' tags | sort -rV | head -n1)"
43
- echo "STABLE_TAG =${STABLE_TAG:-v0.0.0}" >> $GITHUB_ENV
48
+ echo "stable_tag =${STABLE_TAG:-v0.0.0}" >> $GITHUB_ENV
44
49
LATEST_TAG="$(grep -P '^v\d+\.\d+\.\d+' tags | sort -rV | head -n1)"
45
- echo "LATEST_TAG =${LATEST_TAG:-v0.0.0}" >> $GITHUB_ENV
50
+ echo "latest_tag =${LATEST_TAG:-v0.0.0}" >> $GITHUB_ENV
46
51
- name : Update latest and stable tags
47
52
run : |
48
53
skopeo copy docker://${{ github.repository }}:${{ env.stable_tag }} docker://${{ github.repository }}:stable
You can’t perform that action at this time.
0 commit comments