-
Notifications
You must be signed in to change notification settings - Fork 1.6k
55 lines (48 loc) · 1.77 KB
/
release-2-tag-docker-push.yml
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
name: "Release-2: Tag, Release, Push"
env:
GIT_USERNAME: "DefectDojo release bot"
GIT_EMAIL: "dojo-release-bot@users.noreply.github.com"
workflow_name: 'release 2 tag release docker push' # needed in cache key, which doesn't support comma's
on:
workflow_dispatch:
inputs:
# the actual branch that can be chosen on the UI is made irrelevant by further steps
# because someone will forget one day to change it.
release_number:
description: 'Release version (x.y.z format)'
required: true
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: master
- name: Configure git
run: |
git config --global user.name "${{ env.GIT_USERNAME }}"
git config --global user.email "${{ env.GIT_EMAIL }}"
- name: Create new tag ${{ github.event.inputs.release_number }}
# at this point, the PR from the 1st workflow is merged into master.
run: |
git tag -a ${{ github.event.inputs.release_number }} -m "[bot] release ${{ github.event.inputs.release_number }}"
git push origin ${{ github.event.inputs.release_number }}
release-helm-chart:
needs: tag
uses: ./.github/workflows/release-x-manual-helm-chart.yml
with:
release_number: ${{ github.event.inputs.release_number }}
secrets: inherit
release-docker-containers:
needs: tag
uses: ./.github/workflows/release-x-manual-docker-containers.yml
with:
release_number: ${{ github.event.inputs.release_number }}
secrets: inherit
release-drafter:
needs: release-docker-containers
uses: ./.github/workflows/release-drafter.yml
with:
version: ${{ github.event.inputs.release_number }}
secrets: inherit