Skip to content

Commit 75993ae

Browse files
committed
add tag ci
1 parent deef454 commit 75993ae

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/ci-tag.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
push:
3+
tags:
4+
- '[0-9]+.[0-9]+.[0-9]+'
5+
- '[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
6+
- '[0-9]+.[0-9]+.[0-9]+-preview.[0-9]+'
7+
8+
name: ci-tag
9+
10+
env:
11+
DOTNET_VERSION: 9.0.x
12+
REGISTRY: ghcr.io
13+
IMAGE_NAME: ${{ github.repository_owner }}/api
14+
15+
jobs:
16+
17+
# Pre-job to find the latest tag
18+
get-latest-tag:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
latest-tag: ${{ steps.latest-tag.outputs.tag }}
22+
steps:
23+
- name: Find latest tag
24+
id: latest-tag
25+
uses: oprypin/find-latest-tag@v1
26+
with:
27+
repository: ${{ github.repository }}
28+
regex: '^\d+\.\d+\.\d+$'
29+
releases-only: false
30+
31+
# Delegate building and containerizing to a single workflow.
32+
build-and-containerize:
33+
needs: get-latest-tag
34+
uses: ./.github/workflows/ci-build.yml
35+
with:
36+
platforms: linux/amd64,linux/arm64
37+
latest: ${{ needs.get-latest-tag.outputs.latest-tag == github.ref_name }}

0 commit comments

Comments
 (0)