Skip to content

Commit

Permalink
Merge pull request #31 from kingsukhoi:feature/publish-docker-image
Browse files Browse the repository at this point in the history
Feature/publish docker image
  • Loading branch information
tijmenvandenbrink authored Sep 11, 2023
2 parents dff01f6 + 7da50f5 commit a7c4662
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Docker Image CI

on:
push:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v3
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v2.10.0
with:
platforms: linux/arm/v7,linux/arm64/v8
- name: Log in to the Container registry
uses: docker/login-action@v2.2.0
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Short SHA
id: shortsha
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build container
run: docker buildx build --push -t ghcr.io/${{github.repository}}:latest -t ghcr.io/${{github.repository}}:${{ github.sha }} -t ghcr.io/${{github.repository}}:${{ steps.shortsha.outputs.sha_short }} --platform linux/arm/v7,linux/arm64/v8 .

0 comments on commit a7c4662

Please sign in to comment.