Merge pull request #61 from shopware/add-host-ref #32
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
# 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: | |
push: | |
tags: | |
- '*.*.*' | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
id-token: write | |
packages: write | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- 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 release branch | |
id: goreleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
distribution: goreleaser | |
version: '~> v1' | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create resources for release | |
run: | | |
make resources path=release | |
make licenses path=release | |
- name: Update release with kube generated files | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref_name }} | |
overwrite: true | |
file_glob: true | |
file: release/* | |
release-helm-chart: | |
runs-on: ubuntu-latest | |
needs: [goreleaser] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: octo-sts/[email protected] | |
id: octo-sts | |
with: | |
scope: shopware/helm-charts | |
identity: shopware-operator | |
- name: make pr on helm-charts for this release | |
run: | | |
make manifests | |
tag=${{ github.ref_name }} | |
git clone https://oauth2:${GITHUB_TOKEN}@github.com/shopware/helm-charts.git | |
rm -rf helm-charts/charts/shopware-operator | |
make helm version=${tag} path=helm-charts/charts/shopware-operator | |
cd helm-charts | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
git checkout -b auto-release-${tag} | |
git add . | |
git commit -m "New shopware operator image" | |
git push origin auto-release-${tag} | |
gh pr create --title "Autorelease from shopware operator" --body "Auto pr from shopware operator" --head "auto-release-${tag}" --base main | |
env: | |
GITHUB_TOKEN: ${{ steps.octo-sts.outputs.token }} |