diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index bcdb41f..c289f3b 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -31,30 +31,26 @@ jobs: - name: Log into registry run: | podman login \ - --authfile ~/.config/containers/auth.json \ --username "${{ forge.actor }}" \ --password "${{ forge.token }}" \ ${{ env.registry }} curl --fail -u ${{ forge.actor }}:${{ forge.token }} -sS ${{ forge.server_url }}/v2/token | jq --raw-output '"Authorization: token \(.token)"' > /tmp/forgejo_token - - name: __DEBUG__ - run: | - echo "~/.config/containers/auth.json" - [ -f ~/.config/containers/auth.json ] && cat ~/.config/containers/auth.json || echo "file doesn't exist" - - echo "/tmp/forgejo_token" - [ -f /tmp/forgejo_token ] && cat /tmp/forgejo_token || echo "file doesn't exist" - - name: Create image run: | nix-build src/default.nix podman load < result - name: Push image - run: >- - podman push - --log-level=debug - --authfile ~/.config/containers/auth.json - localhost/default:latest - ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }} + run: | + podman manifest inspect localhost/default:${{ env.tag }} > /tmp/manifest.json + curl -sS @/tmp/forgejo_token -X PUT --data-binary @/tmp/manifest.json ${{ forge.server_url }}/v2/${{ forge.owner }}/forgejo/manifests/${{ env.tag }} + + # - name: Push image + # run: >- + # podman push + # --log-level=debug + # --authfile ~/.config/containers/auth.json + # localhost/default:latest + # ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }}