Skip to content

Commit

Permalink
fix: updated github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanholsteijn committed Feb 15, 2023
1 parent 793eaf1 commit d1fd509
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/push-to-registry.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
name: Create and publish a Docker image
name: Build and publish the container image

"on":
push:
tags:
- '*'
branches:
- main
- 'main'

jobs:
build-and-push-image:
Expand All @@ -15,27 +17,36 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

-
name: Get tag
id: repository
run: echo "tag=$(git describe --tags HEAD)" > $GITHUB_ENV

-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

-
name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

-
name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/binxio/fromage:latest
tags: ghcr.io/${{ github.repository }}:${{ env.tag }}

0 comments on commit d1fd509

Please sign in to comment.