Checkout repository
Some checks are pending
/ build (push) Successful in 7m51s
/ deploy (push) Waiting to run

Podman doesn't support the branch option so we need to checkout ourself
to make sure the right ref is checked out.
This commit is contained in:
Hornwitser 2025-05-18 17:53:42 +02:00
parent 3f35723f64
commit a90539d7c9

View file

@ -34,11 +34,17 @@ jobs:
DEPLOY_IMAGE=${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
DEPLOY_BRANCH=${{ github.ref_name }}
EOF
-
name: Checkout repository
run: |
git config --global credential.helper store
echo "https://runner:${{ secrets.GITHUB_TOKEN }}@$(echo "${{ github.server_url }}" | cut -b 9-)" > ~/.git-credentials
git clone --branch ${{ github.ref_name }} ${{ github.server_url }}/${{ github.repository }} ${{ github.workspace }}
-
name: Build and push
shell: bash
run: |
podman build --tag ${{ env.REGISTRY_IMAGE}}:latest ${{ github.server_url }}/${{ github.repository }}.git
podman build --tag ${{ env.REGISTRY_IMAGE }}:latest ${{ github.workspace }}
podman push ${{ env.REGISTRY_IMAGE }}:latest
outputs:
DEPLOY_IMAGE: ${{ steps.info.outputs.DEPLOY_IMAGE }}