Skip to content

Commit

Permalink
update container image publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
greenpau committed Sep 20, 2021
1 parent 0b0f4c3 commit 5af11b9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/container_image.yml
@@ -1,3 +1,4 @@
---
name: Container Image Publishing

on: [workflow_dispatch]
Expand All @@ -22,15 +23,15 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.GITHUB_REPO_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags:
- "ghcr.io/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}:$GITHUB_SHA"
- "ghcr.io/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}:latest"
tags: "ghcr.io/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}:$GITHUB_SHA,\
ghcr.io/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}:latest"
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=ghcr.io/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}:latest
cache-from: "type=registry,\
ref=ghcr.io/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}:latest"
cache-to: type=inline

0 comments on commit 5af11b9

Please sign in to comment.