Merge pull request #1 from nevivurn/master #13
Workflow file for this run
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
name: Build and push image | |
on: | |
push: | |
tags: | |
- v* | |
permissions: | |
contents: read | |
id-token: write | |
packages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ghcr.io/${{ github.repository }} | |
- uses: cachix/install-nix-action@v27 | |
- run: nix build .#docker | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish container images | |
env: | |
IMAGES: ${{ steps.meta.outputs.tags }} | |
run: | | |
for img in $IMAGES; do | |
skopeo copy docker-archive:result "docker://$img" | |
done | |
- name: Publish Helm chart | |
run: | | |
VERSION="${GITHUB_REF_NAME#v}" | |
helm package --version "$VERSION" --app-version "$GITHUB_REF_NAME" -d pkg/ chart/ | |
helm push ./pkg/*.tgz "oci://ghcr.io/$GITHUB_REPOSITORY_OWNER" |