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

Commit 937f376

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

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

.github/workflows/docker-stable.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,23 @@
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+
33+
- name: Docker meta for TAG
3534
id: meta
3635
uses: docker/metadata-action@v3
37-
if: ${{ github.event.action == 'refresh' }}
38-
env:
39-
LATEST_TAG: $(git describe --tags --abbrev=0)
4036
with:
4137
images: ${{ secrets.DOCKER_IMAGE }}
4238
tags: |
43-
raw=enable=true,priority=600,prefix=${{matrix.python_version}}-v,suffix=,value=${LATEST_TAG}
39+
type=match,pattern=v(.*),group=1, enable=true,priority=200,prefix=${{matrix.python_version}}-v,suffix=,value=
40+
raw=enable=true,priority=600,prefix=${{matrix.python_version}}-,suffix=,value=${{env.LATEST_TAG}}
4441
4542
- name: Login to DockerHub
4643
uses: docker/login-action@v1

0 commit comments

Comments
 (0)