Merge pull request #1 from ArtemStepanov/feat/github-packaging

Feat/GitHub packaging
This commit is contained in:
Artem Stepanov 2024-10-07 16:00:07 +03:00 committed by GitHub
commit 321bc0f931
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,7 @@
name: Release name: Release
# Controls when the workflow will run # Controls when the workflow will run
on: on:
workflow_dispatch:
release: release:
types: types:
- published - published
@ -25,17 +26,12 @@ jobs:
name: Set up Docker Buildx name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- # https://github.com/docker/login-action - name: Log in to GitHub Container Registry
name: Log in to the Container registry
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
# Maybe there is a default env var for this? registry: ghcr.io
registry: git.maronato.dev username: ${{ github.actor }}
username: ${{ github.repository_owner }}} password: ${{ secrets.GITHUB_TOKEN }}
# Ideally, we should only need to set "permissions: package: write", but
# Gitea is having issues with that. For now, this is a manually created
# token available user-wise, with the "package:write" permission.
password: ${{ secrets.PACKAGE_WRITE_TOKEN }}
- # https://github.com/docker/metadata-action - # https://github.com/docker/metadata-action
# Generate tags and labels for the image # Generate tags and labels for the image
# according to the commit and the branch # according to the commit and the branch
@ -43,9 +39,7 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
# The container image name needs the custom registry in it. images: ghcr.io/${{ github.repository }}
# Maybe there is a default env var for this?
images: git.maronato.dev/${{ github.repository }}
tags: | tags: |
type=ref,event=branch type=ref,event=branch
type=ref,event=pr type=ref,event=pr