steam-openid-connect-provider/.github/workflows/docker-image.yml

60 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2021-05-24 03:05:01 +00:00
name: Docker Image CI
on:
push:
2021-05-24 03:38:53 +00:00
branches:
- main
2021-05-24 03:38:53 +00:00
tags:
- '*'
2021-05-24 03:05:01 +00:00
pull_request:
2021-05-24 03:38:53 +00:00
branches:
- main
2021-05-24 03:38:53 +00:00
2021-05-24 03:05:01 +00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
-
2021-05-24 03:16:53 +00:00
name: Checkout
uses: actions/checkout@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
2021-05-24 03:16:53 +00:00
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
2021-05-24 03:20:29 +00:00
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/byo-software/steam-openid-connect-provider
2021-05-24 03:20:29 +00:00
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
type=raw,value=latest
2021-05-24 03:20:29 +00:00
2021-05-24 03:16:53 +00:00
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: src/
platforms: linux/amd64,linux/arm64
2021-05-24 03:20:29 +00:00
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}