Skip to content

fix: Remove replace clause (#158) #17

fix: Remove replace clause (#158)

fix: Remove replace clause (#158) #17

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
test:
uses: ./.github/workflows/e2e-tests.yml
with:
clientId: ${{ vars.SLOCTL_CLIENT_ID }}
ref: ${{ github.ref_name }}
target: test/bats/e2e
secrets:
clientSecret: ${{ secrets.SLOCTL_CLIENT_SECRET }}
qa-approval:
runs-on: ubuntu-latest
environment: qa-approval
steps:
- name: No-op approval
run: echo "This is a no-op step, QA needs to approve it and may perform testing beforehand"
goreleaser:
runs-on: ubuntu-latest
needs: [test, qa-approval]
steps:
- name: Checkout Source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Quay
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
nobl9/sloctl
quay.io/nobl9/sloctl
flavor: |
latest=true
tags: |
type=sha
type=semver,pattern={{version}}
- name: Release Binaries
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64, linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: LDFLAGS=-s -w -X github.com/nobl9/sloctl/internal.BuildVersion=${{ github.ref_name }}
docker-test:
uses: ./.github/workflows/e2e-tests.yml
needs: [goreleaser]
strategy:
matrix:
image: [nobl9/sloctl, quay.io/nobl9/sloctl]
with:
clientId: ${{ vars.SLOCTL_CLIENT_ID }}
ref: ${{ github.ref_name }}
sloctlImage: ${{ matrix.image }}:${{ github.ref_name }}
target: test/go/e2e-docker
secrets:
clientSecret: "${{ secrets.SLOCTL_CLIENT_SECRET }}"