Update .forgejo/workflows/build.yml

This commit is contained in:
Seraphim Strub 2025-03-22 10:00:20 +00:00
parent 937d5be728
commit fb25699a64

View file

@ -133,11 +133,18 @@ jobs:
# username: ${{ github.actor }} # username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }} # password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to the Container registry and push # - name: Log in to the Container registry and push
run: | # run: |
echo "${{ secrets.GITHUB_TOKEN }}" | sudo podman login rievo.dev -u ${{ github.actor }} --password-stdin # echo "${{ secrets.GITHUB_TOKEN }}" | sudo podman login rievo.dev -u ${{ github.actor }} --password-stdin
podman tag "${{ env.IMAGE_NAME }}:latest" "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:latest" # podman tag "${{ env.IMAGE_NAME }}:latest" "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
podman push "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:latest" # podman push "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
- name: Log in to the GitHub Container registry
uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # master
with:
registry: rievo.dev
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR.
# https://github.com/macbre/push-to-ghcr/issues/12 # https://github.com/macbre/push-to-ghcr/issues/12
@ -153,19 +160,19 @@ jobs:
# with: # with:
# string: ${{ env.IMAGE_NAME }} # string: ${{ env.IMAGE_NAME }}
# - name: Push To GHCR - name: Push To GHCR
# uses: https://github.com/redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2 uses: https://github.com/redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2
# if: github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) if: github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
# id: push id: push
# env: env:
# REGISTRY_USER: ${{ github.actor }} REGISTRY_USER: ${{ github.actor }}
# REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
# with: with:
# registry: ${{ env.IMAGE_REGISTRY }} registry: ${{ env.IMAGE_REGISTRY }}
# image: ${{ env.IMAGE_NAME }} image: ${{ env.IMAGE_NAME }}
# tags: ${{ steps.metadata.outputs.tags }} tags: ${{ steps.metadata.outputs.tags }}
# username: ${{ env.REGISTRY_USER }} username: ${{ env.REGISTRY_USER }}
# password: ${{ env.REGISTRY_PASSWORD }} password: ${{ env.REGISTRY_PASSWORD }}
# This section is optional and only needs to be enabled if you plan on distributing # This section is optional and only needs to be enabled if you plan on distributing
# your project for others to consume. You will need to create a public and private key # your project for others to consume. You will need to create a public and private key