Skip to content

Merge pull request #44 from dlcs/feature/troubleshooting #86

Merge pull request #44 from dlcs/feature/troubleshooting

Merge pull request #44 from dlcs/feature/troubleshooting #86

Workflow file for this run

name: Build and push docker image
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
jobs:
build-push:
runs-on: ubuntu-latest
steps:
- id: checkout
uses: actions/checkout@v4
- id: setup-dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.0.x"
- id: dotnet-test
run: dotnet test ./src/IIIFAuth2/ /p:Configuration=Release --verbosity normal
- id: buildx
uses: docker/setup-buildx-action@v3
- id: docker-meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/dlcs/iiif-auth-2
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,format=long
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- id: docker-cache
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- id: ghcr-login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: docker_build
uses: docker/build-push-action@v5
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
push: ${{ github.actor != 'dependabot[bot]' }}