Skip to content

Merge pull request #38 from nowsprinting/dependabot/github_actions/do… #26

Merge pull request #38 from nowsprinting/dependabot/github_actions/do…

Merge pull request #38 from nowsprinting/dependabot/github_actions/do… #26

Workflow file for this run

name: Docker build
on:
push:
branches:
- master
paths:
- .github/workflows/build-image.yml
- Dockerfile
- entrypoint.sh
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DIFF_PDF_VERSION: 'v0.5'
jobs:
build-and-push-docker-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
build-args: REPO_REF=${{ env.DIFF_PDF_VERSION }}
push: true
labels: org.opencontainers.image.source=https://github.com/${{ github.repository }}
tags: |
ghcr.io/${{ github.repository_owner }}/diff-pdf:latest
ghcr.io/${{ github.repository_owner }}/diff-pdf:${{ env.DIFF_PDF_VERSION }}
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,job,pullRequest
mention: here
if_mention: failure
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: failure() && github.repository_owner == 'nowsprinting' # Skip public fork, because can not read secrets.