Skip to content

Commit 58f9082

Browse files
authored
Bump gitops (#49)
* ⬆️ bump gitops * 🚚 rename jira vars * 🔥 remove docker enabled * 🎨 change requirements
1 parent c5ca235 commit 58f9082

File tree

3 files changed

+47
-60
lines changed

3 files changed

+47
-60
lines changed

.github/workflows/template_gitops.yml

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,33 @@ name: GitOps
33
on:
44
workflow_call:
55
inputs:
6-
dockerbuildargs:
6+
docker-build-args:
77
required: false
88
type: string
9-
dockerbuildtarget:
9+
docker-build-target:
1010
required: false
1111
type: string
12-
dockerenabled:
13-
required: false
14-
type: boolean
15-
default: true
16-
dockerimage:
12+
docker-image:
1713
required: false
1814
type: string
1915
default: private/${{ github.event.repository.name }}
20-
gitopsdev:
16+
gitops-dev:
2117
required: false
2218
type: string
23-
gitopsstage:
19+
gitops-stage:
2420
required: false
2521
type: string
26-
gitopsprod:
22+
gitops-prod:
2723
required: false
2824
type: string
2925
secrets:
30-
docker_username:
31-
required: true
32-
docker_password:
33-
required: true
34-
gitops_token:
35-
required: true
36-
npm_token:
26+
docker-username:
27+
required: false
28+
docker-password:
29+
required: false
30+
gitops-token:
31+
required: false
32+
npm-token:
3733
required: false
3834

3935
jobs:
@@ -48,25 +44,18 @@ jobs:
4844
- name: Checkout
4945
uses: actions/checkout@v3
5046

51-
- uses: actions/checkout@v3
52-
with:
53-
repository: Staffbase/gitops-github-action
54-
ref: v3
55-
path: .github/gitops
56-
5747
- name: GitOps (build, push and deploy a new Docker image)
58-
uses: ./.github/gitops
48+
uses: Staffbase/gitops-github-action@v4
5949
with:
60-
dockerusername: ${{ secrets.docker_username }}
61-
dockerpassword: ${{ secrets.docker_password }}
62-
dockerenabled: ${{ inputs.dockerenabled }}
50+
docker-username: ${{ secrets.docker-username }}
51+
docker-password: ${{ secrets.docker-password }}
6352
# remove npm token if feature is available: https://github.com/github-community/community/discussions/17554
64-
dockerbuildargs: |
65-
${{ inputs.dockerbuildargs }}
66-
NPM_TOKEN=${{ secrets.npm_token }}
67-
dockerbuildtarget: ${{ inputs.dockerbuildtarget }}
68-
dockerimage: ${{ inputs.dockerimage }}
69-
gitopstoken: ${{ secrets.gitops_token }}
70-
gitopsdev: ${{ inputs.gitopsdev }}
71-
gitopsstage: ${{ inputs.gitopsstage }}
72-
gitopsprod: ${{ inputs.gitopsprod }}
53+
docker-build-args: |
54+
${{ inputs.docker-build-args }}
55+
NPM_TOKEN=${{ secrets.npm-token }}
56+
docker-build-target: ${{ inputs.docker-build-target }}
57+
docker-image: ${{ inputs.docker-image }}
58+
gitops-token: ${{ secrets.gitops-token }}
59+
gitops-dev: ${{ inputs.gitops-dev }}
60+
gitops-stage: ${{ inputs.gitops-stage }}
61+
gitops-prod: ${{ inputs.gitops-prod }}

.github/workflows/template_jira_tagging.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ on:
77
required: true
88
type: string
99
default: ${{ github.event.repository.name }}
10-
tag_matcher:
10+
tag-matcher:
1111
required: false
1212
type: string
1313
secrets:
14-
jira_url:
14+
jira-url:
1515
required: true
16-
jira_token:
16+
jira-token:
1717
required: true
18-
jira_email:
18+
jira-email:
1919
required: true
2020

2121
jobs:
@@ -34,14 +34,14 @@ jobs:
3434
id: fetchTicketIds
3535
uses: Staffbase/[email protected]
3636
env:
37-
TAG_MATCHER: ${{ inputs.tag_matcher }}
37+
TAG_MATCHER: ${{ inputs.tag-matcher }}
3838

3939
- name: Add release notes to JIRA tickets
4040
uses: Staffbase/[email protected]
4141
env:
42-
JIRA_BASEURL: ${{ secrets.jira_url }}
43-
JIRA_TOKEN: ${{ secrets.jira_token }}
44-
JIRA_EMAIL: ${{ secrets.jira_email }}
42+
JIRA_BASEURL: ${{ secrets.jira-url }}
43+
JIRA_TOKEN: ${{ secrets.jira-token }}
44+
JIRA_EMAIL: ${{ secrets.jira-email }}
4545
with:
4646
issueIds: ${{ steps.fetchTicketIds.outputs.tIDs }}
4747
componentName: ${{ inputs.name }}

README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,33 +76,31 @@ jobs:
7676
gitops:
7777
uses: Staffbase/gha-workflows/.github/workflows/[email protected]
7878
with:
79-
# optional: build and push the Docker image, default: true
80-
dockerenabled: false
8179
# optional: list of build-time variables
82-
dockerbuildargs: |
80+
docker-build-args: |
8381
"any important args"
8482
# optional: set the target stage to build
85-
dockerbuildtarget: "any target"
83+
docker-build-target: "any target"
8684
# optional: name of the docker image, default: private/<repository_name>
87-
dockerimage: <your-image>
85+
docker-image: <your-image>
8886
# optional: files which should be updated for dev
89-
gitopsdev: |-
87+
gitops-dev: |-
9088
your files
9189
# optional: files which should be updated for stage
92-
gitopsstage: |-
90+
gitops-stage: |-
9391
your files
9492
# optional: files which should be updated for prod
95-
gitopsprod: |-
93+
gitops-prod: |-
9694
your files
9795
secrets:
9896
# token to access the repository
99-
gitops_token: ${{ <your-gitops-token> }}
97+
gitops-token: ${{ <your-gitops-token> }}
10098
# username for the docker registry
101-
docker_username: ${{ <your-docker-username> }}
99+
docker-username: ${{ <your-docker-username> }}
102100
# password for the docker registry
103-
docker_password: ${{ <your-docker-password> }}
101+
docker-password: ${{ <your-docker-password> }}
104102
# optional: token to pull private npm packages
105-
npm_token: ${{ <your-npm-token> }}
103+
npm-token: ${{ <your-npm-token> }}
106104
```
107105
</details>
108106
@@ -127,14 +125,14 @@ jobs:
127125
# name of the service to add as label, default: name of the repository
128126
name: 'component name'
129127
# optional: regex to match the tags
130-
tag_matcher: your regex
128+
tag-matcher: your regex
131129
secrets:
132130
# basic url for jira api
133-
jira_url: ${{ <your-url> }}
131+
jira-url: ${{ <your-url> }}
134132
# api token for jira usage
135-
jira_token: ${{ <your-token> }}
133+
jira-token: ${{ <your-token> }}
136134
# email of the api token owner
137-
jira_email: ${{ <your-email> }}
135+
jira-email: ${{ <your-email> }}
138136
```
139137
</details>
140138

0 commit comments

Comments
 (0)