v0.0.19 #41
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
--- | |
name: "Release" | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
### setup environment... | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
### build app and other release artifacts | |
# this takes the same amount of time as using docker-build, but doesn't currently work... | |
# it seems the binary in the docker image isn't being named '/manager' | |
# - name: Run GoReleaser | |
# uses: goreleaser/goreleaser-action@v6 | |
# with: | |
# distribution: goreleaser | |
# version: "~> v2" | |
# args: release --clean | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# KO_DOCKER_REPO: ghcr.io/${{ github.repository }} | |
# this takes the same amount of time as using goreleaser, but doesn't create release tarballs | |
- name: Build and Push Docker Images | |
run: make docker-buildx IMAGE_TAG_BASE=ghcr.io/${{ github.actor }}/istio-fortsa GIT_TAG=${{ github.event.release.tag_name }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push OLM Bundle Image | |
run: make bundle bundle-build bundle-push IMAGE_TAG_BASE=ghcr.io/${{ github.actor }}/istio-fortsa GIT_TAG=${{ github.event.release.tag_name }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push OLM Catalog Image | |
run: make catalog-build catalog-push IMAGE_TAG_BASE=ghcr.io/${{ github.actor }}/istio-fortsa GIT_TAG=${{ github.event.release.tag_name }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
### generate and upload helm chart artifacts | |
- name: Build and Push OCI Helm Chart | |
run: make helm-push DOCKER_REPO_BASE=ghcr.io/${{ github.actor }} GIT_TAG=${{ github.event.release.tag_name }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Rename Helm Chart Tarball File for Upload | |
run: mv istio-fortsa-${{ github.event.release.tag_name }}.tgz istio-fortsa-helm-chart-${{ github.event.release.tag_name }}.tgz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Helm Chart Tarball to Release | |
uses: AButler/upload-release-assets@v3.0 | |
with: | |
files: "istio-fortsa-helm-chart-${{ github.event.release.tag_name }}.tgz" | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run gh-pages chart-releaser | |
# uses: helm/chart-releaser-action@1.6.0 # 1.6.0 is broken with error "latest_tag: unbound variable" (issue #171) | |
uses: fhofherr/chart-releaser-action@171-unbound-variable-latest_tag # I found a fork with a fix... | |
with: | |
charts_dir: chart | |
skip_packaging: true | |
skip_existing: true | |
config: .cr.yaml | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |