Skip to content

Commit

Permalink
Merge pull request #9 from beelux/main
Browse files Browse the repository at this point in the history
Automatic building and publishing of Docker images (GitHub Actions)
  • Loading branch information
jdonkervliet authored Apr 3, 2024
2 parents 69dfaf7 + 1ec77ca commit 8b737ce
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release-docker-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release docker image
on:
push:
branches:
- 'main'
workflow_dispatch:
inputs:
imageTag:
description: 'Docker Image tag'
required: true
default: 'latest'
type: string
env:
DEV_TAG: dev
concurrency:
group: ${{ github.event_name }}
cancel-in-progress: true
jobs:
build_and_release:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image and push
uses: docker/build-push-action@v3
env:
IMAGE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.imageTag || env.DEV_TAG }}
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}

0 comments on commit 8b737ce

Please sign in to comment.