Skip to content

Commit fd04268

Browse files
committed
chore: Drop obsolete GH actions
1 parent e3a24fc commit fd04268

File tree

3 files changed

+58
-59
lines changed

3 files changed

+58
-59
lines changed

.github/workflows/release.yml

Lines changed: 51 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,70 @@
1-
name: Release Chart
1+
name: Create release # You may choose a different name
2+
run-name: ${{ inputs.releaseversion }} # Enumerates entries in the "workflow runs" view
23
on:
34
workflow_dispatch:
45
inputs:
56
releaseversion:
6-
description: Release version
7+
description: "Release version"
78
required: true
89
type: string
9-
default: X.Y.Z
10+
default: "X.Y.Z"
11+
1012
jobs:
11-
release:
12-
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
13-
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
13+
release: # Arbitrarily chosen
14+
name: Release
15+
runs-on: ubuntu-latest
1416
permissions:
1517
contents: write
16-
runs-on: ubuntu-latest
18+
packages: write
19+
attestations: write
20+
id-token: write
1721
steps:
22+
- uses: actions/create-github-app-token@v1
23+
id: app-token
24+
with:
25+
app-id: ${{ vars.CI_APP_ID }}
26+
private-key: ${{ secrets.CI_PRIVATE_KEY }}
27+
1828
- name: Checkout
1929
uses: actions/checkout@v4
2030
with:
2131
fetch-depth: 0
22-
- name: Configure Git
23-
run: |
24-
git config user.name "$GITHUB_ACTOR"
25-
git config user.email "[email protected]"
26-
- name: Install Helm
27-
uses: azure/setup-helm@v4
28-
- name: Install Python
29-
uses: actions/setup-python@v5
30-
with:
31-
python-version: "3.9"
32-
check-latest: true
33-
- name: Set up chart-testing
34-
uses: helm/[email protected]
35-
- name: Run chart-testing (lint)
36-
run: ct lint --config .ct.yaml
37-
- name: Run chart-releaser
38-
uses: helm/[email protected]
39-
with:
40-
charts_dir: .
41-
config: .cr.yaml
32+
token: ${{ steps.app-token.outputs.token }}
33+
ref: ${{ github.head_ref }}
34+
35+
- name: Get GitHub App User ID
36+
id: get-user-id
37+
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
4238
env:
43-
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
- name: Login to GitHub Container Registry
39+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
40+
41+
- name: Configure Git author
4542
run: |
46-
echo ${{ secrets.CT_OCI_GITHUB_TOKEN }} | helm registry login ghcr.io -u $ --password-stdin
47-
- name: Push Charts to GHCR
43+
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
44+
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
45+
46+
- name: Write version vars
4847
run: |
49-
for pkg in .cr-release-packages/*; do
50-
if [ -z "${pkg:-}" ]; then
51-
break
52-
fi
53-
helm push "${pkg}" oci://ghcr.io/cloudtooling/helm-charts
54-
done
55-
- name: tag-and-release
56-
id: tag-and-release
57-
uses: avakar/tag-and-release@v1
58-
with:
59-
release_name: ${{ github.event.inputs.releaseversion }}
60-
tag_name: ${{ github.event.inputs.releaseversion }}
61-
draft: true
62-
env:
63-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64-
- name: Add release of codelists zip to github release
65-
uses: actions/upload-release-asset@v1
48+
echo "{\"version\":\"${{ github.event.inputs.releaseversion }}\"}" | jq > config.json
49+
50+
- name: Conventional Changelog Action
51+
uses: TriPSs/conventional-changelog-action@v6
52+
with:
53+
input-file: CHANGELOG.md
54+
github-token: ${{ steps.app-token.outputs.token }}
55+
version-file: config.json
56+
pre-release: true
57+
skip-bump: true
58+
skip-tag: true
59+
skip-on-empty: true
60+
tag-prefix: "v"
61+
62+
- name: Create Release on GH
63+
id: tag-and-release
64+
uses: avakar/tag-and-release@v1
65+
with:
66+
draft: true
67+
release_name: ${{ github.event.inputs.releaseversion }}
68+
tag_name: v${{ github.event.inputs.releaseversion }}
6669
env:
6770
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68-
with:
69-
upload_url: ${{ steps.tag-and-release.outputs.upload_url }}
70-
asset_path: codelists/target/codelists-${{ github.event.inputs.releaseversion }}.jar
71-
asset_name: 3rdpartyGenCode-codelists.jar
72-
asset_content_type: application/zip

.github/workflows/workflow.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ on:
77
- develop
88
defaults:
99
run:
10-
working-directory: 'CloudTooling.springboot'
11-
10+
working-directory: "CloudTooling.springboot"
1211
jobs:
1312
lint:
1413
name: Lint
@@ -17,13 +16,13 @@ jobs:
1716
- name: Check out the codebase.
1817
uses: actions/checkout@v4
1918
with:
20-
path: 'CloudTooling.springboot'
19+
path: "CloudTooling.springboot"
2120
- name: Set up Python 3.
2221
uses: actions/setup-python@v5
2322
with:
24-
python-version: '3.x'
23+
python-version: "3.x"
2524
- name: Install test dependencies.
2625
run: pip3 install yamllint
2726
- name: Lint code.
28-
run: |
29-
yamllint .
27+
run: |-
28+
yamllint .

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Create a *requirements.yml* refering to this role and a *playbook.yml*, e.g.:
2323
```
2424
You also need to provide a `springboot_configuration_template` which will be used as config template.
2525

26+
>**NOTE**: The ZIP file
27+
2628
Within your CI/CD pipeline just run the playbook then, e.g. via GH action:
2729
```
2830
- name: Setup key for deployment

0 commit comments

Comments
 (0)