Checkout repository
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:
parent
3f35723f64
commit
a90539d7c9
1 changed files with 7 additions and 1 deletions
|
@ -34,11 +34,17 @@ jobs:
|
||||||
DEPLOY_IMAGE=${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
|
DEPLOY_IMAGE=${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
|
||||||
DEPLOY_BRANCH=${{ github.ref_name }}
|
DEPLOY_BRANCH=${{ github.ref_name }}
|
||||||
EOF
|
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
|
name: Build and push
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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
|
podman push ${{ env.REGISTRY_IMAGE }}:latest
|
||||||
outputs:
|
outputs:
|
||||||
DEPLOY_IMAGE: ${{ steps.info.outputs.DEPLOY_IMAGE }}
|
DEPLOY_IMAGE: ${{ steps.info.outputs.DEPLOY_IMAGE }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue