Compare commits
	
		
			2 commits
		
	
	
		
			ede6f306c4
			...
			18c0fb7dc7
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 18c0fb7dc7 | ||
|  | b99eaa44eb | 
					 1 changed files with 16 additions and 4 deletions
				
			
		|  | @ -17,6 +17,7 @@ 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 | ||||||
|  | @ -24,12 +25,23 @@ jobs: | ||||||
|           # 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 | ||||||
|  |           cat > ~/.podman/config.json <<EOF | ||||||
|  |           { | ||||||
|  |             "auths": { | ||||||
|  |               "${{ env.registry }}": { | ||||||
|  |                 "auth": "$(echo -n "${{ forge.actor }}:${{ env.PACKAGE_TOKEN }}" | base64 -w 0)" | ||||||
|  |               } | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |           EOF | ||||||
| 
 | 
 | ||||||
|       - uses: actions/checkout@v4 |       - uses: actions/checkout@v4 | ||||||
| 
 | 
 | ||||||
|       - name: Log into registry |       # - name: Log into registry | ||||||
|         run: | |       #   run: | | ||||||
|           podman login --username "${{ forge.actor }}" --password "${{ secrets.PACKAGE_TOKEN }}" ${{ env.registry }} |       #     echo "${{ secrets.PACKAGE_TOKEN }}" | podman login --username "${{ forge.actor }}" --password-stdin ${{ env.registry }} | ||||||
| 
 | 
 | ||||||
|       - name: Create image |       - name: Create image | ||||||
|         run: | |         run: | | ||||||
|  | @ -38,4 +50,4 @@ jobs: | ||||||
| 
 | 
 | ||||||
|       - name: Push image |       - name: Push image | ||||||
|         run: | |         run: | | ||||||
|           podman push localhost/${{ env.image }}:${{ env.tag }} ${{ env.registry }}/${{ forge.repo }}/${{ env.image }}:${{ env.tag }} |           podman push --authfile=~/.podman/config.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