Skip to content

Build and push

Build and push #33

Workflow file for this run

# The name of this file is used in the helm charts repo for octo-sts.
# Please keep that in mind if you want to rename this file.
name: Build and push
on:
workflow_dispatch:
push:
branches:
- "main"
permissions:
contents: write
packages: write
env:
REGISTRY: ghcr.io
jobs:
goreleaser:
runs-on: runs-on=${{ github.run_id }}/runner=sw-amd64/cpu=2
outputs:
tag: ${{ steps.get_tag.outputs.tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run goreleaser on developer branch
id: goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v1"
args: release --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push images
run: |
docker push ghcr.io/shopware/shopware-operator:${{ fromJSON(steps.goreleaser.outputs.metadata).version }}-arm64
docker push ghcr.io/shopware/shopware-operator:${{ fromJSON(steps.goreleaser.outputs.metadata).version }}-amd64