This commit is contained in:
parent
18c0fb7dc7
commit
aab5830cf0
1 changed files with 5 additions and 3 deletions
|
|
@ -17,17 +17,19 @@ jobs:
|
|||
name: Build and push images
|
||||
runs-on: default
|
||||
steps:
|
||||
# cheatsheet: https://nexveridian.com/blog/forgejo-pushing-container-images/
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
nix-env -iA nixpkgs.nodejs nixpkgs.podman nixpkgs.kvmtool
|
||||
|
||||
# cheatsheet: https://nexveridian.com/blog/forgejo-pushing-container-images/
|
||||
- name: Prepare environment
|
||||
run: |
|
||||
# configure container policy to accept insecure registry
|
||||
mkdir -p ~/.config/containers
|
||||
echo '{ "default": [ {"type":"insecureAcceptAnything"} ] }' > ~/.config/containers/policy.json
|
||||
|
||||
# configure authentication
|
||||
cat > ~/.podman/config.json <<EOF
|
||||
cat > ~/.config/containers/auth.json <<EOF
|
||||
{
|
||||
"auths": {
|
||||
"${{ env.registry }}": {
|
||||
|
|
@ -50,4 +52,4 @@ jobs:
|
|||
|
||||
- name: Push image
|
||||
run: |
|
||||
podman push --authfile=~/.podman/config.json localhost/${{ env.image }}:${{ env.tag }} ${{ env.registry }}/${{ forge.repo }}/${{ env.image }}:${{ env.tag }}
|
||||
podman push --authfile=~/.config/containers/auth.json localhost/${{ env.image }}:${{ env.tag }} ${{ env.registry }}/${{ forge.repo }}/${{ env.image }}:${{ env.tag }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue