Merge pull request #54 from redhat-marketplace/fix/go1.22 #33
Workflow file for this run
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: release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
- name: Ginkgo | |
run: | | |
go install github.com/onsi/ginkgo/v2/ginkgo | |
go install github.com/onsi/gomega/... | |
- name: Test | |
run: ginkgo -r --randomize-all --randomize-suites --fail-on-pending --cover --trace --race --show-node-events | |
release: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22' | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{github.repository}} | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Get TAG | |
id: get_tag | |
run: echo TAG=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io/rh-marketplace | |
username: ${{secrets['quayUser']}} | |
password: ${{secrets['quayPassword']}} | |
- name: Release build | |
id: release_build | |
uses: docker/build-push-action@v3 | |
with: | |
outputs: "type=registry,push=true" | |
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x | |
build-args: | | |
Version=${{ env.TAG }} | |
GitCommit=${{ github.sha }} | |
tags: | | |
quay.io/rh-marketplace/datactl:${{ github.sha }} | |
quay.io/rh-marketplace/datactl:${{ env.TAG }} | |
quay.io/rh-marketplace/datactl:latest |