adding GH Actions workflow on shpod

This commit is contained in:
Bret Fisher
2021-03-09 19:01:53 -05:00
parent b650525c0d
commit c0d464e7fc

View File

@@ -0,0 +1,56 @@
name: shpod
on:
push:
branches:
- 'mastery'
jobs:
dockerize:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
# list of Docker images to use as base name for tags
images: |
bretfisher/shpod
# ghcr.io/bretfisher/shpod
# add git short SHA as Docker tag
tag-sha: true
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
# name: Login to GHCR
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ secrets.GHCR_USERNAME }}
# password: ${{ secrets.GHCR_TOKEN }}
# -
name: Build and push clock
uses: docker/build-push-action@v2
with:
context: vote
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }},bretfisher/shpod:latest
labels: ${{ steps.docker_meta.outputs.labels }}