Skip to content

Commit 04403c9

Browse files
authored
Use reusable workflows (#223)
1 parent 5595f10 commit 04403c9

File tree

7 files changed

+76
-295
lines changed

7 files changed

+76
-295
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
paths:
8+
- '.github/workflows/ci.yml'
9+
- '**/*.go'
10+
- 'makefile'
11+
- 'go.mod'
12+
- 'go.sum'
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
build-and-verify:
23+
uses: Open-CMSIS-Pack/workflows-and-actions-collection/.github/workflows/build-and-verify.yml@v1.0.0
24+
secrets:
25+
QLTY_COVERAGE_TOKEN: ${{ secrets.QLTY_COVERAGE_TOKEN }}
26+
with:
27+
program: cbridge
28+
go-version-file: ./go.mod
29+
enable-code-climate: true
30+
artifact-retention-days: 1
31+
32+
publish-test-results:
33+
name: "Publish Tests Results"
34+
needs: [ build-and-verify ]
35+
runs-on: ubuntu-latest
36+
permissions:
37+
checks: write
38+
pull-requests: write
39+
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.workflow != 'Release' }}
40+
steps:
41+
- name: Harden Runner
42+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
43+
with:
44+
egress-policy: audit
45+
46+
- name: Download Artifacts
47+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
48+
with:
49+
path: artifacts
50+
51+
- name: publish test results
52+
uses: EnricoMi/publish-unit-test-result-action/linux@3a74b2957438d0b6e2e61d67b05318aa25c9e6c6 # v2.20.0
53+
with:
54+
files: artifacts/**/cbridge-testreport-*.xml
55+
report_individual_runs: true
56+
action_fail_on_inconclusive: true

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ permissions:
1515
jobs:
1616
dependency-review:
1717
runs-on: ubuntu-latest
18+
if: github.repository_owner == 'Open-CMSIS-Pack'
1819
steps:
1920
- name: Harden Runner
2021
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
@@ -23,5 +24,6 @@ jobs:
2324

2425
- name: 'Checkout Repository'
2526
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
27+
2628
- name: 'Dependency Review'
2729
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4.7.3

.github/workflows/markdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions: read-all
1717

1818
jobs:
1919
markdown-check:
20-
uses: Open-CMSIS-Pack/workflows-and-actions-collection/.github/workflows/markdown-lint.yml@main
20+
uses: Open-CMSIS-Pack/workflows-and-actions-collection/.github/workflows/markdown-lint.yml@v1.0.0
2121
with:
2222
lint-config: '.github/markdownlint.jsonc'
2323
link-check-config: '.github/markdown-link-check.jsonc'

.github/workflows/test.yml

Lines changed: 0 additions & 236 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Update go-workflows
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "30 3 * * *"
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
update-workflows:
14+
uses: Open-CMSIS-Pack/workflows-and-actions-collection/.github/workflows/update-workflows.yml@v1.0.0
15+
secrets:
16+
TOKEN_ACCESS: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)