Update .forgejo/workflows/build.yml
This commit is contained in:
parent
937d5be728
commit
fb25699a64
1 changed files with 25 additions and 18 deletions
|
@ -133,11 +133,18 @@ jobs:
|
|||
# username: ${{ github.actor }}
|
||||
# password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log in to the Container registry and push
|
||||
run: |
|
||||
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 push "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
|
||||
# - name: Log in to the Container registry and push
|
||||
# run: |
|
||||
# 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 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.
|
||||
# https://github.com/macbre/push-to-ghcr/issues/12
|
||||
|
@ -153,19 +160,19 @@ jobs:
|
|||
# with:
|
||||
# string: ${{ env.IMAGE_NAME }}
|
||||
|
||||
# - name: Push To GHCR
|
||||
# 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)
|
||||
# id: push
|
||||
# env:
|
||||
# REGISTRY_USER: ${{ github.actor }}
|
||||
# REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# registry: ${{ env.IMAGE_REGISTRY }}
|
||||
# image: ${{ env.IMAGE_NAME }}
|
||||
# tags: ${{ steps.metadata.outputs.tags }}
|
||||
# username: ${{ env.REGISTRY_USER }}
|
||||
# password: ${{ env.REGISTRY_PASSWORD }}
|
||||
- name: Push To GHCR
|
||||
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)
|
||||
id: push
|
||||
env:
|
||||
REGISTRY_USER: ${{ github.actor }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
registry: ${{ env.IMAGE_REGISTRY }}
|
||||
image: ${{ env.IMAGE_NAME }}
|
||||
tags: ${{ steps.metadata.outputs.tags }}
|
||||
username: ${{ env.REGISTRY_USER }}
|
||||
password: ${{ env.REGISTRY_PASSWORD }}
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue