Skip to content

Bump github.com/onsi/gomega from 1.33.0 to 1.33.1 #60

Bump github.com/onsi/gomega from 1.33.0 to 1.33.1

Bump github.com/onsi/gomega from 1.33.0 to 1.33.1 #60

name: Build, Test, & Publish
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
GO_VERSION: ~1.21
jobs:
unit_tests:
name: unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Unit tests
run: go test -v ./...
build_dev_image:
name: build dev image
runs-on: ubuntu-latest
needs: unit_tests
permissions:
contents: 'write'
id-token: 'write'
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: OCI Metadata for multi-arch image
id: meta
uses: docker/metadata-action@v5
with:
images: |
rabbitmqoperator/default-user-credential-updater
tags: |
type=sha
type=ref,event=pr
type=semver,pattern={{version}}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64, linux/arm64, linux/ppc64le, linux/s390x
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: OCI Metadata for single-arch amd64 image
if: github.event_name != 'pull_request'
id: single-arch-meta-amd64
uses: docker/metadata-action@v5
with:
images: |
rabbitmqoperator/default-user-credential-updater
flavor: |
latest=false
tags: |
type=semver,pattern={{version}},suffix=-amd64,latest=false
type=sha,suffix=-amd64,latest=false
- name: Build and push single-arch amd64 image
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.single-arch-meta-amd64.outputs.tags }}
labels: ${{ steps.single-arch-meta-amd64.outputs.labels }}
- name: OCI Metadata for single-arch arm64 image
if: github.event_name != 'pull_request'
id: single-arch-meta-arm64
uses: docker/metadata-action@v5
with:
images: |
rabbitmqoperator/default-user-credential-updater
flavor: |
latest=false
tags: |
type=semver,pattern={{version}},suffix=-arm64,latest=false
type=sha,suffix=-arm64,latest=false
- name: Build and push single-arch arm64 image
if: github.event_name != 'pull_request'
#if: startsWith(github.ref, 'refs/tags/v')
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.single-arch-meta-arm64.outputs.tags }}
labels: ${{ steps.single-arch-meta-arm64.outputs.labels }}
release:
name: Release to GitHub Releases
runs-on: ubunut-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [ unit_tests, build_dev_image ]
steps:
- uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
generate_release_notes: true
draft: true