Skip to content

Commit

Permalink
ci: deploy Docker image for every push on main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
moreal committed May 13, 2024
1 parent 854c672 commit 2f2a35d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: push docker image

on:
push:
branches:
- "main"

jobs:
build_and_push:
name: build_and_push (${{ matrix.docker.repo }})
strategy:
matrix:
docker:
- repo: planetariumhq/9c-board
if: github.ref_type == 'branch'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: login
run: |
docker login \
--username '${{ secrets.DOCKER_USERNAME }}' \
--password '${{ secrets.DOCKER_ACCESS_TOKEN }}'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: build-and-push
run: |
docker buildx build . \
--platform linux/arm64/v8,linux/amd64 \
--tag ${{ matrix.docker.repo }}:git-${{ github.sha }} \
--push

0 comments on commit 2f2a35d

Please sign in to comment.