This commit is contained in:
parent
d9c94d6455
commit
64941d6ac5
1 changed files with 11 additions and 15 deletions
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue