From a3066be43e1a3a8698e8bda86a70acbfa8c7d75f Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Mon, 8 Sep 2025 12:50:18 +0200 Subject: [PATCH] . --- .forgejo/actions/push_container/action.yml | 28 ++++++++++++++++++++++ .forgejo/actions/push_container/push.sh | 0 .forgejo/workflows/build.yml | 12 +++------- 3 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 .forgejo/actions/push_container/action.yml create mode 100644 .forgejo/actions/push_container/push.sh diff --git a/.forgejo/actions/push_container/action.yml b/.forgejo/actions/push_container/action.yml new file mode 100644 index 0000000..5ef7ae4 --- /dev/null +++ b/.forgejo/actions/push_container/action.yml @@ -0,0 +1,28 @@ +#======================================================================= +# Metadata +#======================================================================= +name: Push OCI container +description: Push the `source` image to the `destination` registry + +#======================================================================= +# Parameters +#======================================================================= +inputs: + source: + required: true + description: The source image to be pushed + + destination: + required: true + description: where to push the image to + +#======================================================================= +# Logic +#======================================================================= +runs: + using: composite + steps: + - name: Authenticate + run: | + echo "Authenticate" + echo "pushing image '${{ inputs.source }}' to '${{ inputs.destination }}'" \ No newline at end of file diff --git a/.forgejo/actions/push_container/push.sh b/.forgejo/actions/push_container/push.sh new file mode 100644 index 0000000..e69de29 diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 8305759..0c04888 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -36,16 +36,10 @@ jobs: nix-build src/default.nix podman load < result - - uses: https://github.com/Frozen-Tapestry/container-action@v1 + - uses: ./.forgejo/actions/push_container with: - login_registry: ${{ env.registry }} - login_username: ${{ env.actor }} - login_password: ${{ env.token }} - - tags: ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }} - # tags: localhost/${{ env.image }}:${{ env.tag }} - - push: true + source: ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }} + destination: ${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }} # - name: Log into registry # run: >-