Merge pull request #51 from evrardjp-cagip/bump_goreleaser #182
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- 'master' | |
jobs: | |
release: | |
name: Create Build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
component: [webhook, api, operator] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: cagip/kubi-${{ matrix.component }} | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
- name: run tests | |
run: make test | |
- uses: goreleaser/goreleaser-action@v6 | |
if: github.event_name == 'pull_request' | |
with: | |
distribution: goreleaser | |
version: v2.5.0 | |
args: release --snapshot --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ORG: ${{ github.REPOSITORY_OWNER }} | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: goreleaser/goreleaser-action@v6 | |
if: github.event_name != 'pull_request' | |
with: | |
distribution: goreleaser | |
version: v2.5.0 | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |