Skip to content

Merge pull request #288 from jenkins-x-plugins/pr-1950cdc5-0082-41aa-… #66

Merge pull request #288 from jenkins-x-plugins/pr-1950cdc5-0082-41aa-…

Merge pull request #288 from jenkins-x-plugins/pr-1950cdc5-0082-41aa-… #66

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.7.0
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
with:
args: -c "make release"
entrypoint: bash
- env:
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }}
REPOSITORY: ${{ github.repository }}
VERSION: ${{ steps.prep.outputs.version }}
name: changelog
uses: docker://ghcr.io/jenkins-x/jx-boot:latest
with:
entrypoint: .github/workflows/jenkins-x/changelog.sh
- env:
GITHUB_TOKEN: ${{ secrets.GIT_BOT_TOKEN }}
REPOSITORY: ${{ github.repository }}
VERSION: ${{ steps.prep.outputs.version }}
COSIGN_EXPERIMENTAL: "true"
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:
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.15
with:
entrypoint: jx-updatebot
args: pr --git-credentials --add-changelog changelog.md
- 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