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
|
- name: Log into registry
|
||||||
run: |
|
run: |
|
||||||
podman login \
|
podman login \
|
||||||
--authfile ~/.config/containers/auth.json \
|
|
||||||
--username "${{ forge.actor }}" \
|
--username "${{ forge.actor }}" \
|
||||||
--password "${{ forge.token }}" \
|
--password "${{ forge.token }}" \
|
||||||
${{ env.registry }}
|
${{ env.registry }}
|
||||||
|
|
||||||
curl --fail -u ${{ forge.actor }}:${{ forge.token }} -sS ${{ forge.server_url }}/v2/token | jq --raw-output '"Authorization: token \(.token)"' > /tmp/forgejo_token
|
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
|
- name: Create image
|
||||||
run: |
|
run: |
|
||||||
nix-build src/default.nix
|
nix-build src/default.nix
|
||||||
podman load < result
|
podman load < result
|
||||||
|
|
||||||
- name: Push image
|
- name: Push image
|
||||||
run: >-
|
run: |
|
||||||
podman push
|
podman manifest inspect localhost/default:${{ env.tag }} > /tmp/manifest.json
|
||||||
--log-level=debug
|
curl -sS @/tmp/forgejo_token -X PUT --data-binary @/tmp/manifest.json ${{ forge.server_url }}/v2/${{ forge.owner }}/forgejo/manifests/${{ env.tag }}
|
||||||
--authfile ~/.config/containers/auth.json
|
|
||||||
localhost/default:latest
|
# - name: Push image
|
||||||
${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }}
|
# 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