Skip to content

Commit

Permalink
Push images to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrage authored Jun 23, 2024
1 parent 2829b97 commit 7727277
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Docker Image CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: amd64,arm64

- name: Log in to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Build and push images
run: |
for dir in containerfiles/*/; do
repo_name=$(basename "$dir")
docker buildx build --platform linux/amd64,linux/arm64 \
-t ghcr.io/${{ secrets.REGISTRY_USERNAME }}/${repo_name}:latest \
--push "$dir"
done

0 comments on commit 7727277

Please sign in to comment.