improve comments and ghcr username

This commit is contained in:
Bret Fisher
2021-05-01 15:58:08 -05:00
parent 156d25aefa
commit 2f30cbf018

View File

@@ -1,6 +1,8 @@
---
name: Build and Push Image
on:
# we want pull requests so we can build(test) but not push to image registry
pull_request:
branches:
- 'main'
@@ -37,14 +39,17 @@ jobs:
tags: |
type=raw,value=latest
-
# we need qemu and buildx so we can build multiple platforms later
name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
-
# BuildKit (used with `docker buildx`) is the best way to build images
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
-
# This makes image builds fast!
name: Cache Docker layers
uses: actions/cache@v2
with:
@@ -65,9 +70,11 @@ jobs:
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
# this will build the images, once per platform,
# then push to both Docker Hub and GHCR
name: Build and push
id: docker_build
uses: docker/build-push-action@v2