Skip to content

Commit

Permalink
Merge pull request #18 from bsdlp/master
Browse files Browse the repository at this point in the history
build docker image
  • Loading branch information
jat255 authored Mar 24, 2024
2 parents 2e2ba15 + 39a2b16 commit 272b97a
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
push:
branches:
- master
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
name: deploy
jobs:
docker:
strategy:
matrix:
image: ["api_server", "client"]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: checkout
uses: actions/checkout@v3

- name: docker meta
id: dockermeta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}/${{ matrix.image }}
tags: |
type=sha
type=raw,value=latest
- name: log in to docker registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: set up qemu
uses: docker/setup-qemu-action@v2

- name: set up docker buildx
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v4
with:
context: ${{ matrix.image }}
push: true
tags: ${{ steps.dockermeta.outputs.tags }}
labels: ${{ steps.dockermeta.outputs.labels }}

0 comments on commit 272b97a

Please sign in to comment.