-
Notifications
You must be signed in to change notification settings - Fork 21
90 lines (87 loc) · 2.84 KB
/
jenkins-x-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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.19.5
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-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://goreleaser/goreleaser:v1.8.3
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.0.84
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