Spot/.github/workflows/docker.yml
spiral b2e7996f5d
fix GH actions docker build
if this works, how did the build ever work
2022-10-21 17:42:11 +00:00

36 lines
873 B
YAML

name: Docker build
on:
push:
branches: [ main ]
jobs:
image:
name: Build Docker image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/apparyllisorg/spot:${{ github.sha }}
ghcr.io/apparyllisorg/spot:latest
labels: ${{ steps.meta.outputs.labels }}