-
Notifications
You must be signed in to change notification settings - Fork 9
38 lines (33 loc) · 925 Bytes
/
ci-tag.yml
File metadata and controls
38 lines (33 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
name: ci-tag
env:
DOTNET_VERSION: 10.0.x
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/api
jobs:
# Pre-job to find the latest tag
get-latest-tag:
runs-on: ubuntu-latest
outputs:
latest-tag: ${{ steps.latest-tag.outputs.tag }}
steps:
- name: Find latest tag
id: latest-tag
uses: oprypin/find-latest-tag@v1
with:
repository: ${{ github.repository }}
regex: '^\d+\.\d+\.\d+$'
releases-only: false
# Delegate building and containerizing to a single workflow.
build-and-containerize:
needs: get-latest-tag
uses: ./.github/workflows/ci-build.yml
with:
platforms: linux/amd64,linux/arm64
latest: ${{ needs.get-latest-tag.outputs.latest-tag == github.ref_name }}
push: true
tag-prefix: 'tag'