-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish SemVer-tagged images on tag pushes to main (#24)
- Loading branch information
1 parent
b12dfb8
commit 34bcd15
Showing
2 changed files
with
42 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
name: Create SemVer-tagged OCI image | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
publish-image: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
packages: write | ||
id-token: write | ||
steps: | ||
|
||
- name: Checkout | ||
uses: >- # v4.1.1 | ||
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
- name: Install Nix | ||
uses: >- # v7 | ||
DeterminateSystems/nix-installer-action@5620eb4af6b562c53e4d4628c0b6e4f9d9ae8612 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Test image | ||
run: | | ||
nix run .#local-image-test | ||
- name: Upload image | ||
run: | | ||
nix run .#publish-ghcr ${{github.ref_name}} | ||
env: | ||
GHCR_REGISTRY: ghcr.io | ||
GHCR_USERNAME: ${{ github.actor }} | ||
GHCR_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
GHCR_IMAGE_NAME: ${{ github.repository }} |
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