Skip to content

Commit 250facf

Browse files
Chore/docker test (#58)
* "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs" * "ci: 👷 (#40) fix for workflow runs"
1 parent 216d16c commit 250facf

File tree

6 files changed

+80
-20
lines changed

6 files changed

+80
-20
lines changed

.github/workflows/ci_go.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: ci_go
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
6+
workflow_call:
47

58
jobs:
69
go:

.github/workflows/lint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Lint
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
6+
workflow_call:
47

58
permissions:
69
contents: read

.github/workflows/release.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,44 @@ on:
88
required: true
99
type: string
1010
default: v0.2.8-alpha-amd64
11+
push:
12+
branches:
13+
- main
1114

1215
jobs:
1316
call-ci-go:
1417
uses: ./.github/workflows/ci_go.yml
1518
call-lint:
19+
permissions:
20+
contents: read
21+
pull-requests: read
1622
uses: ./.github/workflows/lint.yml
17-
call-test-docker-images:
23+
release-please:
1824
needs:
1925
- call-ci-go
2026
- call-lint
21-
uses: ./.github/workflows/ci_go.yml
27+
permissions:
28+
contents: write
29+
pull-requests: write
30+
uses: ./.github/workflows/release_please.yml
31+
release-go:
32+
if: ${{ needs.release-please.outputs.release_created }}
33+
needs:
34+
- release-please
35+
permissions:
36+
contents: write
37+
packages: write
38+
pull-requests: write
39+
uses: ./.github/workflows/release_go.yml
40+
secrets: inherit
41+
call-test-docker-images:
42+
if: ${{ needs.release-please.outputs.release_created || inputs.tag }}
43+
needs:
44+
- release-go
45+
- release-please
46+
permissions:
47+
packages: read
48+
uses: ./.github/workflows/test_docker_images.yml
2249
with:
23-
tag: ${{ inputs.tag }}
50+
tag: ${{ needs.release-please.outputs.tag_name || inputs.tag }}
51+
secrets: inherit

.github/workflows/release_go.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
name: goreleaser
22

33
on:
4-
# push:
5-
# # run only against tags
6-
# tags:
7-
# - v*.*.*
4+
workflow_call:
5+
secrets:
6+
DOCKERHUB_USERNAME:
7+
description: 'The dockerhub username'
8+
required: true
9+
DOCKERHUB_TOKEN:
10+
description: 'The dockerhub token'
11+
required: true
12+
AUR_KEY:
13+
description: 'The AUR key'
14+
required: true
15+
NFPM_GPG_KEY:
16+
description: 'The NFPM GPG key'
17+
required: true
18+
NFPM_DEFAULT_PASSPHRASE:
19+
description: 'The NFPM GPG pass phrase'
20+
required: true
821
workflow_dispatch:
9-
release:
10-
types: [ published ]
1122

1223
permissions:
1324
contents: write
1425
packages: write
1526
pull-requests: write
16-
# issues: write
1727

1828
jobs:
1929
goreleaser:

.github/workflows/release_please.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
1+
name: release-please
2+
13
on:
2-
push:
3-
branches:
4-
- main
4+
workflow_call:
5+
outputs:
6+
release_created:
7+
description: "Set if the release has been created"
8+
value: ${{ jobs.release-please.outputs.release_created }}
9+
tag_name:
10+
description: "The tag name"
11+
value: ${{ jobs.release-please.outputs.tag_name }}
12+
workflow_dispatch:
513

614
permissions:
715
contents: write
816
pull-requests: write
917

10-
name: release-please
11-
1218
jobs:
1319
release-please:
1420
runs-on: ubuntu-latest
21+
outputs:
22+
release_created: ${{ steps.release-please.outputs.release_created }}
23+
tag_name: ${{ steps.release-please.outputs.tag_name }}
1524
steps:
1625
- uses: google-github-actions/release-please-action@v3
26+
id: release-please
1727
with:
1828
release-type: go
1929
prerelease: true
20-
# package-name: release-please-action

.github/workflows/test_docker_images.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
name: test-docker-images
2+
13
on:
24
workflow_call:
35
inputs:
46
tag:
57
description: 'The docker image tag'
68
required: true
79
type: string
10+
secrets:
11+
DOCKERHUB_USERNAME:
12+
description: 'The dockerhub username'
13+
required: true
14+
DOCKERHUB_TOKEN:
15+
description: 'The dockerhub token'
16+
required: true
817
workflow_dispatch:
918
inputs:
1019
tag:
@@ -13,8 +22,6 @@ on:
1322
type: string
1423
default: v0.2.8-alpha-amd64
1524

16-
name: test-docker-images
17-
1825
permissions:
1926
packages: read
2027

0 commit comments

Comments
 (0)