mirror of
https://github.com/BretFisher/shpod.git
synced 2026-05-06 09:56:32 +00:00
adding GH Actions workflow on shpod
This commit is contained in:
56
.github/workflows/docker-build-and-push.yml
vendored
Normal file
56
.github/workflows/docker-build-and-push.yml
vendored
Normal 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 }}
|
||||
Reference in New Issue
Block a user