diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 35c4970..b0bf779 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -8,6 +8,7 @@ on: - main env: + REGISTRY: forge.niblock.tech REGISTRY_USERNAME: ${{ github.actor }} REGISTRY_PASSWORD: ${{ secrets.REGISTRY_TOKEN }} REGISTRY_IMAGE_NAME: ${{ github.repository }} @@ -19,21 +20,25 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@v4 - - - name: Build the container image using Buildah - id: build-image - uses: https://forge.niblock.tech/actions/buildah-build@v2 - with: - image: alpine - tags: latest - containerfiles: ./docker/latest/Dockerfile - - name: Publish to NibTech Forge Registry - id: publish-image - uses: https://forge.niblock.tech/actions/push-to-registry@v2 + - name: Login to the GitHub Container Registry + uses: actions/docker-login-action@v3 with: - image: ${{ steps.build-image.outputs.image }} - tags: ${{ steps.build-image.outputs.tags }} - registry: forge.niblock.tech/containers + registry: ${{ env.REGISTRY }} username: ${{ env.REGISTRY_USERNAME }} - password: ${{ env.REGISTRY_PASSWORD }} \ No newline at end of file + password: ${{ env.REGISTRY_PASSWORD }} + + - name: Extract repository metadata (tags, labels) + id: meta + uses: actions/docker-metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE_NAME }} + + - name: Build and publish Alpine Latest + uses: actions/docker-build-push-action@v5 + with: + context: .docker/latest + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE_NAME }}:latest + labels: ${{ steps.meta.outputs.labels }}