fix actions failing on PRs

This commit is contained in:
Daniel Bauer
2023-05-19 09:23:04 +02:00
committed by GitHub
parent 2e47bde719
commit 8e82c4a5fe

View File

@@ -14,17 +14,15 @@ env:
IMAGE_NAME: pdfact-service IMAGE_NAME: pdfact-service
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: set tag - name: set tag
id: tag id: tag
run: echo "::set-output name=tag::$(date +%s)" run: echo "::set-output name=tag::$(date +%s)"
- name: docker login - name: docker login
if: ${{github.event_name != 'pull_request'}}
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{env.CONTAINER_REGISTRY_USER}} username: ${{env.CONTAINER_REGISTRY_USER}}
@@ -33,7 +31,7 @@ jobs:
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
context: . context: .
push: true push: ${{github.event_name != 'pull_request'}}
tags: ${{env.CONTAINER_REGISTRY_USER}}/${{env.IMAGE_NAME}}:latest , ${{env.CONTAINER_REGISTRY_USER}}/${{env.IMAGE_NAME}}:${{ steps.tag.outputs.tag }} tags: ${{env.CONTAINER_REGISTRY_USER}}/${{env.IMAGE_NAME}}:latest , ${{env.CONTAINER_REGISTRY_USER}}/${{env.IMAGE_NAME}}:${{ steps.tag.outputs.tag }}
- name: docker push readme - name: docker push readme
uses: christian-korneck/update-container-description-action@v1 uses: christian-korneck/update-container-description-action@v1
@@ -46,4 +44,3 @@ jobs:
provider: dockerhub provider: dockerhub
short_description: 'Analyze pdf files with pdfact using a simple web API.' short_description: 'Analyze pdf files with pdfact using a simple web API.'
readme_file: 'README.md' readme_file: 'README.md'