This commit is contained in:
parent
8e3fff2ca1
commit
6910d565c7
@ -21,11 +21,11 @@ jobs:
|
|||||||
docker_tag=$(git describe --tags --abbrev=0 | cut -d 'v' -f2-)
|
docker_tag=$(git describe --tags --abbrev=0 | cut -d 'v' -f2-)
|
||||||
echo $docker_tag
|
echo $docker_tag
|
||||||
echo "docker_tag=${docker_tag}" >> GITHUB_OUTPUT
|
echo "docker_tag=${docker_tag}" >> GITHUB_OUTPUT
|
||||||
if curl --silent -f -lSL "https://hub.docker.com/v2/repositories/jiriks74/onlyoffice-documentserver/tags/${docker_tag}" > /dev/null; then exit 0; else exit 1; fi
|
if curl --silent -f -lSL "https://hub.docker.com/v2/repositories/jiriks74/onlyoffice-documentserver/tags/${docker_tag}" > /dev/null; then exit 1; else exit 0; fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Remove temporary files
|
- name: Remove temporary files
|
||||||
if: steps.check-existing.conclusion == 'failure'
|
if: steps.check-existing.conclusion == 'success'
|
||||||
id: remove-temp
|
id: remove-temp
|
||||||
run: |
|
run: |
|
||||||
echo ${{ steps.extract-version.outputs.docker_tag }}
|
echo ${{ steps.extract-version.outputs.docker_tag }}
|
||||||
@ -33,30 +33,30 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Install Docker
|
- name: Install Docker
|
||||||
if: steps.check-existing.conclusion == 'failure'
|
if: steps.check-existing.conclusion == 'success'
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install docker.io -y
|
apt-get install docker.io -y
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
if: steps.check-existing.conclusion == 'failure'
|
if: steps.check-existing.conclusion == 'success'
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
if: steps.check-existing.conclusion == 'failure'
|
if: steps.check-existing.conclusion == 'success'
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
if: steps.check-existing.conclusion == 'failure'
|
if: steps.check-existing.conclusion == 'success'
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
with:
|
with:
|
||||||
# driver-opts: network=host
|
# driver-opts: network=host
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
if: steps.check-existing.conclusion == 'failure'
|
if: steps.check-existing.conclusion == 'success'
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
@ -67,7 +67,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Image already built
|
- name: Image already built
|
||||||
id: image-built
|
id: image-built
|
||||||
if: steps.check-existing.conclusion == 'success'
|
if: steps.check-existing.conclusion == 'failure'
|
||||||
run: |
|
run: |
|
||||||
echo "Image was already built and uploaded"
|
echo "Image was already built and uploaded"
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user