Skip to content

Commit 5ef3edf

Browse files
committed
ci: optimize update workflow
1 parent 52e20cf commit 5ef3edf

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

.github/workflows/update_base_images.yaml

+4-19
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,15 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919

20-
- name: Fetch all tags
21-
run: git fetch --tags
22-
23-
- name: List all tags
24-
run: git tag
25-
26-
- name: Test main_tag
27-
run: git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n1 | sed 's/^v//'
28-
29-
- name: Test next_tag
30-
run: git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-next\.[0-9]+)?$' | sort -V | tail -n1 | sed 's/^v//'
31-
3220
- name: Get latest main tag
3321
id: main_tag
34-
run: echo "main_tag=$(git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n1 | sed 's/^v//')" >> $GITHUB_OUTPUT
22+
run: echo "main_tag=$(git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n1 | sed 's/^v//')" | tee -a $GITHUB_OUTPUT
3523

3624
- name: Get latest next tag
3725
id: next_tag
38-
run: echo "next_tag=$(git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-next\.[0-9]+)?$' | sort -V | tail -n1 | sed 's/^v//')" >> $GITHUB_OUTPUT
39-
40-
- name: Show tags
41-
run: cat $GITHUB_OUTPUT
26+
run: echo "next_tag=$(git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-next\.[0-9]+)?$' | sort -V | tail -n1 | sed 's/^v//')" | tee -a $GITHUB_OUTPUT
4227

43-
update-docker-main:
28+
update-main:
4429
needs: latest-tags
4530
uses: ./.github/workflows/release_docker.yml
4631
with:
@@ -50,7 +35,7 @@ jobs:
5035
nexus_user: ${{ secrets.NEXUS_USERNAME}}
5136
nexus_pass: ${{ secrets.NEXUS_PASSWORD}}
5237

53-
update-docker-next:
38+
update-next:
5439
needs: latest-tags
5540
uses: ./.github/workflows/release_docker.yml
5641
with:

0 commit comments

Comments
 (0)