Skip to content

Commit

Permalink
Add basic workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
adamskrz committed May 22, 2024
1 parent 9e05a79 commit 8196a48
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-container-simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Release Container

on:
push:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:

release:
name: 'Build, Package and Release'
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name }}

permissions:
packages: write

steps:
- name: Checkout branch
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract tags and labels for Docker release
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 8196a48

Please sign in to comment.