autobrr/.github/workflows/docker.yml
2022-01-16 16:06:48 +01:00

42 lines
954 B
YAML

name: docker
on:
push:
tags:
- '*'
permissions:
packages: write
contents: read
jobs:
docker:
name: Build and publish Docker images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get the tag name
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: |
ghcr.io/autobrr/autobrr:${{ env.TAG }}
ghcr.io/autobrr/autobrr:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}