Add fail if sha256sum does not present #204
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: pr | |
on: | |
push: | |
pull_request: | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
pr-tests: | |
name: Build and test images | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
component: [webhook, api, operator] | |
arch: [amd64] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Find current tag version | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
id: tags | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
- name: run tests | |
run: make test | |
- uses: goreleaser/goreleaser-action@v6 | |
with: | |
distribution: goreleaser | |
version: v2.5.0 | |
args: release --snapshot --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ORG: ${{ github.REPOSITORY_OWNER }} | |
- name: Login to container registry | |
# Pull requests are targetting ca-gip/kubi and should not push an image | |
# Only push images for the fork's repository | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push development image into ghcr (packages) | |
# Pull requests are targetting ca-gip/kubi and should not push an image | |
# Only push images for the fork's repository | |
if: github.event_name != 'pull_request' | |
run: | | |
docker push ${{ env.REGISTRY }}/${{ github.REPOSITORY_OWNER }}/kubi-${{ matrix.component }}:${{ steps.tags.outputs.sha_short }}-${{ matrix.arch }} |