..
Some checks failed
Create OCI image(s) / Build and push images (push) Failing after 1m51s

This commit is contained in:
Chris Kruining 2025-09-08 13:07:20 +02:00
parent a3066be43e
commit 12a4a85510
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
4 changed files with 33 additions and 26 deletions

View file

@ -8,6 +8,10 @@ description: Push the `source` image to the `destination` registry
# Parameters # Parameters
#======================================================================= #=======================================================================
inputs: inputs:
registry:
required: true
description: The registry to authen
source: source:
required: true required: true
description: The source image to be pushed description: The source image to be pushed
@ -26,3 +30,9 @@ runs:
run: | run: |
echo "Authenticate" echo "Authenticate"
echo "pushing image '${{ inputs.source }}' to '${{ inputs.destination }}'" echo "pushing image '${{ inputs.source }}' to '${{ inputs.destination }}'"
echo "${{ forge.token }}" | podman login --username '${{ forge.actor }}' --password-stdin
- name: Push
run: |
podman push '${{ inputs.source }}' '${{ inputs.destination }}'

View file

@ -36,29 +36,26 @@ jobs:
nix-build src/default.nix nix-build src/default.nix
podman load < result podman load < result
- uses: ./.forgejo/actions/push_container - name: Log into registry
with: run: |
source: ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }} podman login \
destination: ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }} --log-level=debug \
--authfile ~/.config/containers/auth.json \
--username "${{ forge.actor }}" \
--password "${{ forge.token }}" \
${{ env.registry }}
# - name: Log into registry curl --fail -u${{ forge.actor }}:${{ forge.token }} -sS ${{ env.registry }}/v2/token | jq --raw-output '"Authorization: token \(.token)"'
# run: >-
# podman login
# --log-level=debug
# --authfile ~/.config/containers/auth.json
# --username "${{ forge.actor }}"
# --password "${{ forge.token }}"
# ${{ env.registry }}
# - name: __DEBUG__ - name: __DEBUG__
# run: | run: |
# echo "~/.config/containers/auth.json" echo "~/.config/containers/auth.json"
# [ -f ~/.config/containers/auth.json ] && cat ~/.config/containers/auth.json || echo "file doesn't exist" [ -f ~/.config/containers/auth.json ] && cat ~/.config/containers/auth.json || echo "file doesn't exist"
# - name: Push image - name: Push image
# run: >- run: >-
# podman push podman push
# --log-level=debug --log-level=debug
# --authfile ~/.config/containers/auth.json --authfile ~/.config/containers/auth.json
# localhost/default:latest localhost/default:latest
# ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }} ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }}

View file

@ -5,7 +5,7 @@
with pkgs; with pkgs;
dockerTools.buildImage { dockerTools.buildImage {
name = "git.amarth.cloud/default"; name = "default";
tag = "latest"; tag = "latest";
copyToRoot = buildEnv { copyToRoot = buildEnv {