Skip to content

Commit

Permalink
add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
flemming-pr committed Dec 27, 2024
1 parent 36e238f commit c78d823
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build image
on:
push:
branches: ["main"]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v2.2.1
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: true
tags: "ghcr.io/${{ github.repository }}/main:latest"

0 comments on commit c78d823

Please sign in to comment.