-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from nordeck/nic/feat/add-synapse-module
Migrate the guest module to a proper synapse module
- Loading branch information
Showing
29 changed files
with
842 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# This pipeline runs for every new tag. It will pull the docker container for | ||
# the commit hash of the tag, and will publish it as `:<tag-name>` and `latest`. | ||
name: Release Synapse Guest Module | ||
|
||
on: | ||
push: | ||
tags: | ||
- '@nordeck/synapse-guest-module@*' | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
env: | ||
DOCKER_IMAGE: ghcr.io/nordeck/synapse-guest-module | ||
steps: | ||
- name: Generate Docker metadata of the existing image | ||
id: meta-existing-tag | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.DOCKER_IMAGE }} | ||
tags: | | ||
type=sha,prefix= | ||
- name: Generate Docker metadata of the new image | ||
id: meta-new-tags | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.DOCKER_IMAGE }} | ||
labels: | | ||
org.opencontainers.image.title=Synapse Guest Module | ||
org.opencontainers.image.description=A synapse module to restrict the actions of guests | ||
org.opencontainers.image.vendor=Nordeck IT + Consulting GmbH | ||
tags: | | ||
type=match,pattern=@nordeck/synapse-guest-module@(.*),group=1 | ||
- name: Generate Dockerfile | ||
env: | ||
SOURCE_IMAGE: ${{ fromJSON(steps.meta-existing-tag.outputs.json).tags[0] }} | ||
run: | | ||
echo "FROM $SOURCE_IMAGE" > Dockerfile | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install Cosign | ||
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # @v3.1.2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and push | ||
id: build_and_push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
context: . | ||
tags: ${{ steps.meta-new-tags.outputs.tags }} | ||
labels: ${{ steps.meta-new-tags.outputs.labels }} | ||
platforms: linux/amd64,linux/arm64,linux/s390x | ||
sbom: true | ||
provenance: true | ||
|
||
- name: Sign the images with GitHub OIDC Token | ||
env: | ||
DIGEST: ${{ steps.build_and_push.outputs.digest }} | ||
run: cosign sign --yes "${DOCKER_IMAGE}@${DIGEST}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.