Skip to content

Commit 76fb70b

Browse files
committed
workflows: build and publish container images
1 parent a72bb6e commit 76fb70b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Container Image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: {}
8+
release:
9+
types:
10+
- published
11+
12+
jobs:
13+
container-image:
14+
# Since the base container image GHA requires the following permissions, each job that
15+
# uses it must also specify them. Otherwise, this will fail with (The nested job '...'
16+
# is requesting 'id-token: write', but is only allowed 'id-token: none').
17+
permissions:
18+
contents: read
19+
packages: write
20+
attestations: write
21+
id-token: write
22+
23+
name: Container Image
24+
uses: icinga/github-actions/.github/workflows/container-image.yml@main
25+
with:
26+
# The variable ${{ github.repository }} is not suitable for container image names in our case because
27+
# they must be lowercase, and our organization name is Icinga. Since our repository names are already
28+
# lowercase, no additional modifications are necessary.
29+
image_name: icinga/${{ github.event.repository.name }}
30+
documentation_url: https://icinga.com/docs/icinga2
31+
secrets:
32+
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
33+
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
34+
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}

0 commit comments

Comments
 (0)