Skip to content
This repository was archived by the owner on Feb 9, 2024. It is now read-only.

Commit defed2b

Browse files
committed
CI(actions): Fix stable meta for webhook support
1 parent c6b2ea1 commit defed2b

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

.github/workflows/docker-stable.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,24 @@
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v2
24-
25-
- name: Docker meta for TAG
26-
id: meta
27-
uses: docker/metadata-action@v3
28-
if: ${{ github.event.action != 'refresh' }}
2924
with:
30-
images: ${{ secrets.DOCKER_IMAGE }}
31-
tags: |
32-
type=match,pattern=v(.*),group=1, enable=true,priority=600,prefix=${{matrix.python_version}}-v,suffix=,value=
25+
fetch-depth: 0
3326

34-
- name: Docker meta for TAG (refresh image)
27+
- name: Collect latest git TAG for refresh
28+
id: get_latest_tag
29+
run: |
30+
echo "LATEST_TAG= 0" >> $GITHUB_ENV
31+
echo "LATEST_TAG= $(git describe --tags --abbrev=0)" >> $GITHUB_ENV
32+
echo "Latest tag is set to ${{env.LATEST_TAG}}"
33+
34+
- name: Docker meta for TAG
3535
id: meta
3636
uses: docker/metadata-action@v3
37-
if: ${{ github.event.action == 'refresh' }}
38-
env:
39-
LATEST_TAG: $(git describe --tags --abbrev=0)
4037
with:
4138
images: ${{ secrets.DOCKER_IMAGE }}
4239
tags: |
43-
raw=enable=true,priority=600,prefix=${{matrix.python_version}}-v,suffix=,value=${LATEST_TAG}
40+
type=match,pattern=v(.*),group=1, enable=true,priority=200,prefix=${{matrix.python_version}}-v,suffix=,value=
41+
raw=enable=true,priority=600,prefix=${{matrix.python_version}}-v,suffix=,value=${{env.LATEST_TAG}}
4442
4543
- name: Login to DockerHub
4644
uses: docker/login-action@v1

0 commit comments

Comments
 (0)