Skip to content

Merge pull request #48 from redhat-marketplace/fix/swc #28

Merge pull request #48 from redhat-marketplace/fix/swc

Merge pull request #48 from redhat-marketplace/fix/swc #28

Workflow file for this run

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.21'
- 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.21'
- 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