Skip to content

Commit

Permalink
add workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonR99 committed Dec 6, 2023
1 parent f8761dc commit 046dc01
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build_container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and Release Docker Image

on:
push:
branches:
- main

jobs:
build_and_push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- name: Check out the repository
uses: actions/checkout@v2

- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
run: |
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/your-image-name:latest
docker build -t $IMAGE_NAME .
docker push $IMAGE_NAME

0 comments on commit 046dc01

Please sign in to comment.