Skip to content

Update docker.yml

Update docker.yml #8

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"/cytoid/"$IMAGE" \
--build-arg GITHUB_SHA="$GITHUB_SHA" \
--build-arg GITHUB_REF="$GITHUB_REF" .
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Publish Docker Image
run: |
docker push "$REGISTRY_HOSTNAME"/cytoid/"$IMAGE"