Skip to content

Commit

Permalink
Merge pull request #12 from JacobTheEldest/AddCIDockerBuild
Browse files Browse the repository at this point in the history
fix: condense and clean the docker workflow
  • Loading branch information
JacobTheEldest authored May 11, 2023
2 parents 368da02 + 67ed5d2 commit 0ca82ec
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Build Docker image and Publish to Registries

env:
DOCKER_HUB_REPO: jacobtheeldest/minesweeper

on:
release:
types: [published]
# on:
# push:
# tags:
# - v*

jobs:
build-and-push-image:
Expand All @@ -29,8 +28,8 @@ jobs:
uses: docker/metadata-action@v4
with:
images: |
jacobtheeldest/minesweeper
ghcr.io/jacobtheeldest/minesweeper
${{ env.DOCKER_HUB_REPO }}
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=sha
Expand Down Expand Up @@ -64,9 +63,9 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64 #,linux/arm/v7,linux/arm/v6
push: true
cache-from: type=registry,ref=jacobtheeldest/minesweeper:buildcache
cache-to: type=registry,ref=jacobtheeldest/minesweeper:buildcache,mode=max
cache-from: type=registry,ref=${{ env.DOCKER_HUB_REPO }}:buildcache
cache-to: type=registry,ref=${{ env.DOCKER_HUB_REPO }}:buildcache,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 0ca82ec

Please sign in to comment.