Update .forgejo/workflows/build.yml

This commit is contained in:
Seraphim Strub 2025-03-23 18:39:41 +00:00
parent 0a91d3ac5c
commit 72c4630720

View file

@ -118,41 +118,25 @@ jobs:
# This does not make your image faster to download, just provides better resumability and fixes a few errors. # This does not make your image faster to download, just provides better resumability and fixes a few errors.
# Documentation for Rechunk is provided on their github repository at https://github.com/hhd-dev/rechunk # Documentation for Rechunk is provided on their github repository at https://github.com/hhd-dev/rechunk
# You can enable it by uncommenting the following lines: # You can enable it by uncommenting the following lines:
# - name: Run Rechunker - name: Run Rechunker
# id: rechunk id: rechunk
# uses: https://github.com/hhd-dev/rechunk@f153348d8100c1f504dec435460a0d7baf11a9d2 # v1.1.1 uses: https://github.com/hhd-dev/rechunk@f153348d8100c1f504dec435460a0d7baf11a9d2 # v1.1.1
# with: with:
# rechunk: 'ghcr.io/hhd-dev/rechunk:v1.0.1' rechunk: 'ghcr.io/hhd-dev/rechunk:v1.0.1'
# ref: "raw-img" ref: "${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}"
# prev-ref: "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}" prev-ref: "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }}"
# skip_compression: true skip_compression: true
# version: ${{ env.CENTOS_VERSION }} version: ${{ env.CENTOS_VERSION }}
# labels: ${{ steps.metadata.outputs.labels }} # Rechunk strips out all the labels during build, this needs to be reapplied here with newline separator labels: ${{ steps.metadata.outputs.labels }} # Rechunk strips out all the labels during build, this needs to be reapplied here with newline separator
# This is necessary so that the podman socket can find the rechunked image on its storage # This is necessary so that the podman socket can find the rechunked image on its storage
# - name: Load in podman and tag - name: Load in podman and tag
# run: | run: |
# IMAGE=$(podman pull ${{ steps.rechunk.outputs.ref }}) IMAGE=$(podman pull ${{ steps.rechunk.outputs.ref }})
# sudo rm -rf ${{ steps.rechunk.outputs.output }} sudo rm -rf ${{ steps.rechunk.outputs.output }}
# for tag in ${{ steps.metadata.outputs.tags }}; do for tag in ${{ steps.metadata.outputs.tags }}; do
# podman tag $IMAGE ${{ env.IMAGE_NAME }}:$tag podman tag $IMAGE ${{ env.IMAGE_NAME }}:$tag
# done done
# These `if` statements are so that pull requests for your custom images do not make it publish any packages under your name without you knowing
# They also check if the runner is on the default branch so that things like the merge queue (if you enable it), are going to work
# - name: Login to GitHub Container Registry
# uses: https://github.com/docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
# if: github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
# with:
# registry: rievo.dev
# 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"
# 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