generated from argoproj-labs/argo-workflows-hello-executor-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (61 loc) · 2.07 KB
/
release.yaml
File metadata and controls
66 lines (61 loc) · 2.07 KB
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
name: Create release
on:
workflow_dispatch:
inputs:
tag:
required: true
permissions:
contents: read
jobs:
build:
uses: crenshaw-dev/github-executor-plugin/.github/workflows/build.yaml@main
with:
tag: ${{ github.event.inputs.tag }}
secrets:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
prepare-release:
needs: build
permissions:
contents: write # To push changes to release branch
name: Release
if: github.repository == 'crenshaw-dev/github-executor-plugin'
runs-on: ubuntu-22.04
env:
GIT_USERNAME: crenshaw-dev
GIT_EMAIL: 350466+crenshaw-dev@users.noreply.github.com
RELEASE_TAG: ${{ github.event.inputs.tag }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update plugin.yaml image tag
id: manifests
uses: mikefarah/yq@master
with:
cmd: yq -i '.spec.sidecar.container.image = "crenshawdotdev/github-executor-plugin:" + strenv(RELEASE_TAG)' manifests/plugin.yaml
- name: Update install manifest
run: |
# Download the binary
curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.4.3/argo-linux-amd64.gz
gunzip argo-linux-amd64.gz
chmod +x argo-linux-amd64
./argo-linux-amd64 executor-plugin build ./manifests
- name: Push release tag
run: |
set -ue
git config --global user.email "${GIT_EMAIL}"
git config --global user.name "${GIT_USERNAME}"
git commit manifests/ -m "Bump version to $RELEASE_TAG"
git push origin HEAD
git tag ${RELEASE_TAG}
git push origin ${RELEASE_TAG} --force
- name: Create GitHub release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ env.RELEASE_TAG }}
tag_name: ${{ env.RELEASE_TAG }}
generate_release_notes: true