Skip to content

Commit

Permalink
ci, img push: push images to github registry
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Oct 5, 2022
1 parent ac0511b commit 42215cf
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/image-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Push container image
on:
push:
branches:
- master
env:
image-push-owner: 'maiqueb'
jobs:
push-amd64:
name: Image push/amd64
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

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

- name: Login to Container Registry
if: github.repository_owner == 'maiqueb'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push container image
if: github.repository_owner == 'maiqueb'
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest-amd64
file: images/Dockerfile

0 comments on commit 42215cf

Please sign in to comment.