Skip to content

Merge pull request #37 from reproio/use-github-token #42

Merge pull request #37 from reproio/use-github-token

Merge pull request #37 from reproio/use-github-token #42

Workflow file for this run

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: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- 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