Merge pull request #433 from jenkins-x-plugins/pr-433659c3-30b1-47eb-… #107
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 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GIT_BOT_TOKEN }} | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- uses: fregante/setup-git-user@v1 | |
- name: prep | |
id: prep | |
uses: jenkins-x-plugins/[email protected] | |
with: | |
tag: true | |
github-token: ${{ secrets.GIT_BOT_TOKEN }} | |
- env: | |
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }} | |
VERSION: ${{ steps.prep.outputs.version }} | |
name: release-binary | |
uses: docker://golang:1.22.3 | |
with: | |
args: -c "make release" | |
entrypoint: bash | |
- env: | |
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }} | |
REPO_NAME: ${{ github.event.repository.name }} | |
VERSION: ${{ steps.prep.outputs.version }} | |
name: changelog | |
uses: docker://ghcr.io/jenkins-x/jx-boot:3.10.150 | |
with: | |
entrypoint: .github/workflows/jenkins-x/changelog.sh | |
- env: | |
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }} | |
REPOSITORY: ${{ github.repository }} | |
VERSION: ${{ steps.prep.outputs.version }} | |
name: upload-binaries | |
uses: docker://ghcr.io/jenkins-x/jx-goreleaser-image:0.2.2@sha256:77a7c9b281e8dba01f77d0d46c5bd9834a7bd435570f3396a03bfe63554f03f0 | |
with: | |
entrypoint: .github/workflows/jenkins-x/upload-binaries.sh | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
build-args: | | |
VERSION=${{ steps.prep.outputs.version}} | |
tags: | | |
ghcr.io/${{ github.repository }}:latest | |
ghcr.io/${{ github.repository }}:${{ steps.prep.outputs.version }} | |
- env: | |
GIT_USERNAME: jenkins-x-bot-test | |
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }} | |
VERSION: ${{ steps.prep.outputs.version }} | |
XDG_CONFIG_HOME: /github/home/.config | |
name: promote-release | |
uses: docker://ghcr.io/jenkins-x/jx-updatebot:0.4.22 | |
with: | |
entrypoint: jx-updatebot | |
args: pr --git-credentials | |
- env: | |
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }} | |
GIT_USERNAME: jenkins-x-bot-test | |
DOCKER_REGISTRY_ORG: jenkins-x | |
REPO_NAME: ${{ github.event.repository.name }} | |
VERSION: ${{ steps.prep.outputs.version }} | |
name: Generate and Push SBOM | |
uses: docker://ghcr.io/oras-project/oras:v0.13.0 | |
with: | |
entrypoint: .github/workflows/jenkins-x/sbom-container.sh | |
"on": | |
push: | |
branches: | |
- main |