Fix metadata release series for operator install #15
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: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
permissions: | |
contents: write # Allow to create a release. | |
packages: write | |
jobs: | |
build: | |
name: build and push release images | |
runs-on: ubuntu-latest | |
env: | |
REGISTRY: ghcr.io/${{ github.actor }} | |
steps: | |
- name: Set env | |
run: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV | |
- name: checkout code | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag=v3.3.0 | |
with: | |
fetch-depth: 0 | |
- name: Install go | |
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # tag=v3.5.0 | |
with: | |
go-version: '^1.22' | |
- name: Docker login | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Convert actor name to lowercase and store in the env | |
run: | | |
echo "OWNER=$(echo $GITHUB_ACTOR | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
echo "REGISTRY=$(echo $REGISTRY | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
- name: Build docker image | |
run: make docker-build-all | |
- name: Push docker image | |
run: make docker-push-all | |
publish: | |
name: Publish the draft release | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
env: | |
REGISTRY: ghcr.io/${{ github.actor }} | |
steps: | |
- name: Set env | |
run: echo "RELEASE_TAG=${GITHUB_REF:10}" >> $GITHUB_ENV | |
- name: checkout code | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag=v3.3.0 | |
with: | |
fetch-depth: 0 | |
- name: Install go | |
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # tag=v3.5.0 | |
with: | |
go-version: '^1.22' | |
- name: Convert actor name to lowercase and store in the env | |
run: | | |
echo "OWNER=$(echo $GITHUB_ACTOR | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
echo "REGISTRY=$(echo $REGISTRY | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
- name: generate release artifacts | |
run: make release | |
- name: generate release notes | |
run: make release-notes | |
- name: Release | |
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # tag=v1 | |
with: | |
draft: true | |
files: out/* | |
body_path: _releasenotes/release-notes-${{ env.RELEASE_TAG }}.md | |