mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2024-12-21 19:08:24 +01:00
Update push-docker.yml
This commit is contained in:
parent
e40e47df7d
commit
f7d320ac32
32
.github/workflows/push-docker.yml
vendored
32
.github/workflows/push-docker.yml
vendored
@ -39,18 +39,18 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_HUB_API }}
|
password: ${{ secrets.DOCKER_HUB_API }}
|
||||||
|
|
||||||
- name: Check if tag exists
|
# - name: Check if tag exists
|
||||||
id: checkIdExists
|
# id: checkIdExists
|
||||||
continue-on-error: true
|
# continue-on-error: true
|
||||||
run: |
|
# run: |
|
||||||
response=$(curl -s https://hub.docker.com/v2/repositories/frooodle/s-pdf/tags/?name=${{ steps.versionNumber.outputs.versionNumber }})
|
# response=$(curl -s https://hub.docker.com/v2/repositories/frooodle/s-pdf/tags/?name=${{ steps.versionNumber.outputs.versionNumber }})
|
||||||
result=$(echo $response | jq ".results")
|
# result=$(echo $response | jq ".results")
|
||||||
if [ "$result" == "[]" ]; then
|
# if [ "$result" == "[]" ]; then
|
||||||
echo "Tag ${{ steps.versionNumber.outputs.versionNumber }} doesnt exist. Continuing with build and push."
|
# echo "Tag ${{ steps.versionNumber.outputs.versionNumber }} doesnt exist. Continuing with build and push."
|
||||||
else
|
# else
|
||||||
echo "Tag ${{ steps.versionNumber.outputs.versionNumber }} already exists. Skipping build and push."
|
# echo "Tag ${{ steps.versionNumber.outputs.versionNumber }} already exists. Skipping build and push."
|
||||||
exit 1;
|
# exit 1;
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -58,9 +58,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker buildx create --name mybuilder
|
docker buildx create --name mybuilder
|
||||||
docker buildx use mybuilder
|
docker buildx use mybuilder
|
||||||
|
|
||||||
|
- name: Build and push versioned amd64 and v8
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
run: |
|
||||||
|
docker buildx build --platform="linux/amd64,linux/arm64/v8" --push --tag "frooodle/s-pdf:${{ steps.versionNumber.outputs.versionNumber }}-alpha" .
|
||||||
|
|
||||||
|
|
||||||
- name: Build and push versioned amd64 and v8
|
- name: Build and push versioned amd64 and v8
|
||||||
if: github.ref == 'refs/heads/main' && steps.checkIdExists.outcome != 'failure'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: |
|
run: |
|
||||||
docker buildx build --platform="linux/amd64,linux/arm64/v8" --push --tag "frooodle/s-pdf:${{ steps.versionNumber.outputs.versionNumber }}" .
|
docker buildx build --platform="linux/amd64,linux/arm64/v8" --push --tag "frooodle/s-pdf:${{ steps.versionNumber.outputs.versionNumber }}" .
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user