Skip to content

Commit 22bb315

Browse files
committed
Update GitHub Actions workflows and add Dependabot configuration
1 parent d4b9221 commit 22bb315

File tree

10 files changed

+136
-40
lines changed

10 files changed

+136
-40
lines changed

.github/dependabot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
target-branch: "master"
6+
schedule:
7+
interval: "weekly"
8+
day: "sunday"
9+
labels:
10+
- "auto update"
11+
- "infrastructure"
12+
- "no RN"
13+
open-pull-requests-limit: 3
14+
commit-message:
15+
prefix: "chore"
16+
include: "scope"
17+
18+
- package-ecosystem: "sbt"
19+
directory: "/"
20+
target-branch: "master"
21+
schedule:
22+
interval: "weekly"
23+
day: "sunday"
24+
labels:
25+
- "auto update"
26+
- "dependencies"
27+
- "no RN"
28+
open-pull-requests-limit: 3
29+
commit-message:
30+
prefix: "chore"
31+
include: "scope"

.github/workflows/assign_issue_to_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
name: Add issue to project
2525
runs-on: ubuntu-latest
2626
steps:
27-
- uses: actions/add-to-project@v0.5.0
27+
- uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e
2828
with:
2929
project-url: https://github.com/orgs/AbsaOSS/projects/7
3030
github-token: ${{ secrets.PAT_REPO_PROJECT_DISCUSS }}

.github/workflows/build.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ jobs:
4949

5050
steps:
5151
- name: Checkout code
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
5353

54-
- uses: coursier/cache-action@v6
54+
- uses: coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433
5555

5656
- name: Setup Scala
57-
uses: olafurpg/setup-scala@v10
57+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
5858
with:
5959
java-version: "adopt@1.8"
6060

@@ -74,3 +74,21 @@ jobs:
7474
7575
- name: Build and run integration tests
7676
run: sbt ++${{matrix.scala}} testIT
77+
78+
- name: Aquasec Manifest Generation
79+
run: |
80+
export BILLY_SERVER=https://billy.eu-1.codesec.aquasec.com
81+
curl -sLo install.sh download.codesec.aquasec.com/billy/install.sh
82+
curl -sLo install.sh.checksum https://github.com/argonsecurity/releases/releases/latest/download/install.sh.checksum
83+
if ! cat install.sh.checksum | sha256sum --check; then
84+
echo "install.sh checksum failed"
85+
exit 1
86+
fi
87+
BINDIR="." sh install.sh
88+
rm install.sh install.sh.checksum
89+
./billy generate \
90+
--access-token "${{ secrets.GITHUB_TOKEN }}" \
91+
--aqua-key "${{ secrets.AQUA_KEY }}" \
92+
--aqua-secret "${{ secrets.AQUA_SECRET }}" \
93+
--cspm-url https://eu-1.api.cloudsploit.com \
94+
--artifact-path "${{ github.workspace }}"

.github/workflows/check_pr_release_notes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
runs-on: ubuntu-latest
2828

2929
steps:
30-
- uses: actions/setup-python@v5.1.1
30+
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
3131
with:
3232
python-version: '3.11'
3333

3434
- name: Check presence of release notes in PR description
35-
uses: AbsaOSS/release-notes-presence-check@v0.4.0
35+
uses: AbsaOSS/release-notes-presence-check@8e586b26a5e27f899ee8590a5d988fd4780a3dbf
3636
env:
3737
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3838
with:

.github/workflows/dependabot.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# NOTE: This workflow expects that branch protection rules require all checks to pass before merging.
2+
# Auto-merge will only occur if all required status checks and reviews are successful.
3+
4+
name: Dependabot auto-approve and auto-merge
5+
on:
6+
pull_request:
7+
types: [opened, synchronize]
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
dependabot:
15+
name: Auto-approve and auto-merge Dependabot PRs
16+
runs-on: ubuntu-latest
17+
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'AbsaOSS/balta'
18+
steps:
19+
- name: Dependabot metadata
20+
id: metadata
21+
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b
22+
with:
23+
github-token: "${{ secrets.GITHUB_TOKEN }}"
24+
- name: Approve a PR
25+
run: gh pr review --approve "$PR_URL"
26+
env:
27+
PR_URL: ${{ github.event.pull_request.html_url }}
28+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
- name: Enable auto-merge for Dependabot PRs
30+
if: startsWith(steps.metadata.outputs.update-type, 'version-update') || startsWith(steps.metadata.outputs.update-type, 'security')
31+
run: gh pr merge --auto --squash "$PR_URL"
32+
continue-on-error: true
33+
env:
34+
PR_URL: ${{ github.event.pull_request.html_url }}
35+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/dependent_items.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
check:
4444
runs-on: ubuntu-latest
4545
steps:
46-
- uses: z0al/dependent-issues@v1.5.2
46+
- uses: z0al/dependent-issues@950226e7ca8fc43dc209a7febf67c655af3bdb43
4747
env:
4848
# (Required) The token to use to make API calls to GitHub.
4949
GITHUB_TOKEN: ${{ secrets.PAT_REPO_PROJECT_DISCUSS }}

.github/workflows/jacoco_report.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ jobs:
3232

3333
steps:
3434
- name: Checkout code
35-
uses: actions/checkout@v2
35+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
3636
- name: Setup Scala
37-
uses: olafurpg/setup-scala@v10
37+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
3838
with:
3939
java-version: "adopt@1.8"
4040

@@ -57,7 +57,7 @@ jobs:
5757
- name: Add coverage to PR
5858
if: steps.jacocorun.outcome == 'success'
5959
id: jacoco-balta
60-
uses: madrapps/jacoco-report@v1.7.1
60+
uses: madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
6161
with:
6262
paths: ${{ github.workspace }}/balta/target/scala-${{ env.scalaShort }}/jacoco/report/jacoco.xml
6363
token: ${{ secrets.GITHUB_TOKEN }}
@@ -72,7 +72,7 @@ jobs:
7272
echo "Changed Files coverage ${{ steps.jacoco-balta.outputs.coverage-changed-files }}"
7373
- name: Fail PR if changed files coverage is less than ${{ env.coverage-changed-files }}%
7474
if: steps.jacocorun.outcome == 'success'
75-
uses: actions/github-script@v6
75+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
7676
with:
7777
script: |
7878
const coverageCheckFailed =
@@ -82,7 +82,7 @@ jobs:
8282
}
8383
- name: Fail PR if overall files coverage is less than ${{ env.coverage-overall }}%
8484
if: ${{ (steps.jacocorun.outcome == 'success') && (env.check-overall-coverages == 'true') }}
85-
uses: actions/github-script@v6
85+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
8686
with:
8787
script: |
8888
const coverageCheckFailed =
@@ -92,7 +92,7 @@ jobs:
9292
}
9393
- name: Edit JaCoCo comments on build failure
9494
if: steps.jacocorun.outcome != 'success'
95-
uses: actions/github-script@v6
95+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
9696
with:
9797
script: |
9898
const issue_number = context.issue.number;
@@ -119,3 +119,20 @@ jobs:
119119
}
120120
121121
core.setFailed('JaCoCo test coverage report generation failed, and related PR comments were updated.');
122+
- name: Aquasec Manifest Generation
123+
run: |
124+
export BILLY_SERVER=https://billy.eu-1.codesec.aquasec.com
125+
curl -sLo install.sh download.codesec.aquasec.com/billy/install.sh
126+
curl -sLo install.sh.checksum https://github.com/argonsecurity/releases/releases/latest/download/install.sh.checksum
127+
if ! cat install.sh.checksum | sha256sum --check; then
128+
echo "install.sh checksum failed"
129+
exit 1
130+
fi
131+
BINDIR="." sh install.sh
132+
rm install.sh install.sh.checksum
133+
./billy generate \
134+
--access-token "${{ secrets.GITHUB_TOKEN }}" \
135+
--aqua-key "${{ secrets.AQUA_KEY }}" \
136+
--aqua-secret "${{ secrets.AQUA_SECRET }}" \
137+
--cspm-url https://eu-1.api.cloudsploit.com \
138+
--artifact-path "${{ github.workspace }}"

.github/workflows/release_draft.yml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
tag:
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
3030
with:
3131
fetch-depth: 0
3232
# the following step is disabled because it doesn't order the version tags correctly
3333
# - name: Validate format of received tag
34-
# uses: actions/github-script@v7
34+
# uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
3535
# with:
3636
# script: |
3737
# const newTag = core.getInput('tag-name');
@@ -65,7 +65,7 @@ jobs:
6565
# tag-name: ${{ github.event.inputs.tagName }}
6666

6767
- name: Create and push tag
68-
uses: actions/github-script@v7
68+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
6969
with:
7070
script: |
7171
const tag = core.getInput('tag-name')
@@ -102,47 +102,42 @@ jobs:
102102
needs: tag
103103
runs-on: ubuntu-latest
104104
steps:
105-
- uses: actions/checkout@v4
105+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
106106
with:
107107
fetch-depth: 0
108108
ref: refs/tags/${{ github.event.inputs.tagName }}
109109

110-
- uses: actions/setup-python@v5.1.1
110+
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
111111
with:
112112
python-version: '3.11'
113113

114114
- name: Generate release notes
115115
id: generate_release_notes
116-
uses: AbsaOSS/generate-release-notes@v0.4.0
116+
uses: AbsaOSS/generate-release-notes@b90223510d1704301a36a36f0d86a72a0e72f0cf
117117
env:
118118
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119119
with:
120120
tag-name: ${{ github.event.inputs.tagName }}
121-
chapters: '[
122-
{"title": "No entry 🚫", "label": "duplicate"},
123-
{"title": "No entry 🚫", "label": "invalid"},
124-
{"title": "No entry 🚫", "label": "wontfix"},
125-
{"title": "No entry 🚫", "label": "no RN"},
126-
{"title": "Breaking Changes 💥", "label": "breaking-change"},
127-
{"title": "New Features 🎉", "label": "enhancement"},
128-
{"title": "New Features 🎉", "label": "feature"},
129-
{"title": "Bugfixes 🛠", "label": "bug"},
130-
{"title": "Infrastructure ⚙️", "label": "infrastructure"},
131-
{"title": "Silent-live 🤫", "label": "silent-live"},
132-
{"title": "Documentation 📜", "label": "documentation"}
133-
]'
121+
chapters: |
122+
- { title: No entry 🚫, label: duplicate }
123+
- { title: Breaking Changes 💥, label: breaking-change }
124+
- { title: New Features 🎉, label: enhancement }
125+
- { title: Bugfixes 🛠, label: bug }
126+
- { title: Infrastructure ⚙️, label: infrastructure }
127+
- { title: Silent-live 🤫, label: silent-live }
128+
- { title: Documentation 📜, label: documentation }
129+
- { title: Closed Epics 📚, label: epic }
134130
duplicity-scope: 'service'
135131
duplicity-icon: '🔁'
136132
warnings: true
137-
skip-release-notes-label: "no RN"
133+
skip-release-notes-labels: "no RN"
138134
print-empty-chapters: false
139-
chapters-to-pr-without-issue: true
140135
row-format-issue: '_{title}_ {developed-by} {co-authored-by} in #{number}'
141136
row-format-pr: '_{title}_ {developed-by} {co-authored-by} in #{number}'
142137
row-format-link-pr: true
143138

144139
- name: Create draft release
145-
uses: softprops/action-gh-release@v1
140+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
146141
env:
147142
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148143
with:

.github/workflows/release_publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
2929
with:
3030
fetch-depth: 0
31-
- uses: coursier/cache-action@v5
31+
- uses: coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433
3232

3333
- name: Setup Scala
34-
uses: olafurpg/setup-scala@v14
34+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
3535
with:
3636
java-version: "adopt@1.8"
3737

.github/workflows/test_filenames_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout code
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
3131

3232
- name: Filename Inspector
3333
id: scan-test-files
34-
uses: AbsaOSS/filename-inspector@v0.1.0
34+
uses: AbsaOSS/filename-inspector@355108975e656fac9faaa04209b6df3f9997c8fa
3535
with:
3636
name-patterns: '*UnitTests.*,*IntegrationTests.*'
3737
paths: '**/src/test/scala/**'

0 commit comments

Comments
 (0)