-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (50 loc) · 1.52 KB
/
tagpr.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
name: tagpr
on:
push:
branches: ["main"]
jobs:
tagpr:
runs-on: ubuntu-latest
outputs:
tagpr-tag: ${{ steps.run-tagpr.outputs.tag }}
steps:
- uses: actions/checkout@v3
- id: run-tagpr
uses: Songmu/tagpr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
needs: tagpr
if: needs.tagpr.outputs.tagpr-tag != ''
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: reproiobot
password: ${{ secrets.CR_PAT }}
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v3
with:
context: .
push: true
tags: |
ghcr.io/reproio/send-alb-metrics-to-datadog:latest
ghcr.io/reproio/send-alb-metrics-to-datadog:${{ needs.tagpr.outputs.tagpr-tag }}
labels: |
org.opencontainers.image.name=send-alb-metrics-to-datadog
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.version=${{ needs.tagpr.outputs.tagpr-tag }}
org.opencontainers.image.source=https://github.com/reproio/send-alb-metrics-to-datadog