Skip to content

Update docker.yml

Update docker.yml #6

Workflow file for this run

name: Build and Publish the Docker Image
on:
push:
branches:
- master
env:
GITHUB_SHA: ${{ github.sha }}
IMAGE: images
REGISTRY_HOSTNAME: ghcr.io
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build Docker Image
run: |
docker build \
-t "$REGISTRY_HOSTNAME"/${{ github.repository_owner }}/"$IMAGE" \
--build-arg GITHUB_SHA="$GITHUB_SHA" \
--build-arg GITHUB_REF="$GITHUB_REF" .
- name: Publish Docker Image
run: |
docker push "$REGISTRY_HOSTNAME"/${{ github.repository_owner }}/"$IMAGE"