Skip to content

fix(goreleaser): also test goreleaser in CI #76

fix(goreleaser): also test goreleaser in CI

fix(goreleaser): also test goreleaser in CI #76

Workflow file for this run

name: Test Pull Request
on: [pull_request]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
TestPR:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: '1.26'
- name: Run unit tests
run: |
pwd && ls -ltr && go version && make test
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: GoReleaser
uses: goreleaser/goreleaser-action@v4.2.0
with:
version: latest
args: release --snapshot --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}