Create publish-docker.yaml

This commit is contained in:
Grigory Romodanovskiy 2022-08-01 22:34:21 -04:00 committed by GitHub
parent 238a6f393c
commit 9e9b14f644
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

37
.github/workflows/publish-docker.yaml vendored Normal file
View file

@ -0,0 +1,37 @@
name: Create and publish a Docker image
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}