diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 2571794..b700d34 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -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 }}