autobrr/.github/workflows/docker.yml
Kyle Sanderson 98ae6da6ca
build: add darwin macos (#387)
* enable apple
2022-08-03 14:29:53 +02:00

53 lines
1.3 KiB
YAML

name: docker
on:
push:
branches:
- "master"
- "develop"
tags:
- 'v*'
pull_request:
permissions:
packages: write
contents: read
jobs:
docker:
name: Build and publish Docker images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/autobrr/autobrr
- name: Build and publish image
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ github.event.pull_request.head.sha }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}