docker push update

This commit is contained in:
Peter Buchegger 2022-01-30 23:47:06 +01:00
parent 99eaac3ef3
commit 7480808313
1 changed files with 18 additions and 9 deletions

View File

@ -1,4 +1,4 @@
name: "Docker image build"
name: Create and publish a Docker image
#on:
# push:
@ -7,26 +7,35 @@ name: "Docker image build"
on: [push, pull_request]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v2
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: aprsc.dockerfile
push: true
tags: peterus/trackdirect:aprsc
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}