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
|
name: Build and push images
|
||||||
runs-on: default
|
runs-on: default
|
||||||
steps:
|
steps:
|
||||||
# cheatsheet: https://nexveridian.com/blog/forgejo-pushing-container-images/
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
nix-env -iA nixpkgs.nodejs nixpkgs.podman nixpkgs.kvmtool
|
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
|
# configure container policy to accept insecure registry
|
||||||
mkdir -p ~/.config/containers
|
mkdir -p ~/.config/containers
|
||||||
echo '{ "default": [ {"type":"insecureAcceptAnything"} ] }' > ~/.config/containers/policy.json
|
echo '{ "default": [ {"type":"insecureAcceptAnything"} ] }' > ~/.config/containers/policy.json
|
||||||
|
|
||||||
# configure authentication
|
# configure authentication
|
||||||
cat > ~/.podman/config.json <<EOF
|
cat > ~/.config/containers/auth.json <<EOF
|
||||||
{
|
{
|
||||||
"auths": {
|
"auths": {
|
||||||
"${{ env.registry }}": {
|
"${{ env.registry }}": {
|
||||||
|
|
@ -50,4 +52,4 @@ jobs:
|
||||||
|
|
||||||
- name: Push image
|
- name: Push image
|
||||||
run: |
|
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