Prepare CHANGELOG for v0.4.3 release (#316) #11
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 Build | |
on: | |
push: | |
tags: | |
- 'v[0-9].[0-9]+.[0-9]+' | |
jobs: | |
build-image: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.20.1 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build image | |
run: make docker-build | |
- name: Export image | |
run: tar -czvf images.tar.gz *-image.tar | |
- name: Archive image | |
uses: actions/[email protected] | |
with: | |
name: images | |
path: images.tar.gz | |
test-image: | |
runs-on: ubuntu-22.04 | |
needs: [build-image] | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install regctl | |
uses: regclient/actions/regctl-installer@main | |
- name: Download archived image | |
uses: actions/[email protected] | |
with: | |
name: images | |
path: . | |
- name: Load archived image | |
run: | | |
tar xvf images.tar.gz | |
make load-images | |
- name: Test image | |
run: | | |
docker tag "ghcr.io/${{ github.repository_owner }}/spire-controller-manager:devel" ghcr.io/spiffe/spire-controller-manager:devel | |
(cd demo; ./test.sh) | |
publish-image-and-release: | |
runs-on: ubuntu-22.04 | |
needs: [test-image] | |
permissions: | |
contents: write | |
id-token: write | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install regctl | |
uses: regclient/actions/regctl-installer@main | |
- name: Download archived image | |
uses: actions/[email protected] | |
with: | |
name: images | |
path: . | |
- name: Log in to GHCR | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push image | |
run: | | |
tar xvf images.tar.gz | |
./.github/workflows/scripts/push-images.sh "${GITHUB_REF}" | |
- name: Create Release | |
env: | |
# GH_REPO is required for older releases of `gh`. Until we're | |
# reasonably confident that that the gh release is new enough, | |
# set GH_REPO to the repository to create the release in. | |
# | |
# See https://github.com/cli/cli/issues/3556 | |
GH_REPO: ${{ github.repository }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Create the release using the version number as the title | |
run: gh release create "${GITHUB_REF#refs/tags/}" --title "${GITHUB_REF#refs/tags/}" |