diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 27763fc..c441bf8 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -7,12 +7,16 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build the Docker image + - uses: actions/checkout@v4 + - name: Build the Docker image for temporary use only + if: ${{ ! startsWith(github.ref, 'refs/tags/') }} + run: docker build . --file Dockerfile --tag tmp:latest + - name: Build the Docker image for tag release + if: startsWith(github.ref, 'refs/tags/') run: docker build . --file Dockerfile --tag ${{ secrets.DOCKER_IMAGE_NAME }}:latest - name: Docker Login if: startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -33,4 +37,4 @@ jobs: uses: WSE-research/docker-service-updater@v0.2.1 with: updater_host: ${{ secrets.UPDATER_HOST }} - api_key: ${{ secrets.API_KEY }} \ No newline at end of file + api_key: ${{ secrets.API_KEY }}