Merge pull request #487 from jenkins-x-plugins/pr-890e2805-fe38-48e9-… #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/jx-release-version@v2.4.13 | |
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.19.3 | |
with: | |
args: -c "make release" | |
entrypoint: bash | |
- env: | |
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }} | |
VERSION: ${{ steps.prep.outputs.version }} | |
name: chart-docs | |
uses: docker://jnorwood/helm-docs:v1.4.0 | |
with: | |
args: -c "if [ -d \"charts/$REPO_NAME\" ]; then cd charts/$REPO_NAME; helm-docs; | |
else echo no charts; fi" | |
entrypoint: /bin/ash | |
- 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-changelog:0.0.43 | |
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.1.0@sha256:4ac5aeb4ce850761aeffc585446ea47bbcfa680d096fdd8c5d00c5a8c5adbcc0 | |
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: | |
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }} | |
JX_REPOSITORY_USERNAME: jenkins-x-bot-test | |
VERSION: ${{ steps.prep.outputs.version }} | |
name: release-chart | |
uses: docker://ghcr.io/jenkins-x/jx-boot:latest | |
with: | |
entrypoint: .github/workflows/jenkins-x/release-chart.sh | |
- 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:latest | |
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 |