This commit is contained in:
DerDavidBohl
2025-01-09 08:54:14 +01:00
commit ee2008d26e
10 changed files with 467 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
name: Build Docker Image
on: [push]
jobs:
push_to_registry:
name: Build and push Docker-Image
runs-on: ubuntu-latest
steps:
#- name: Install Docker
# run: curl -fsSL https://get.docker.com | sh
- name: Check out repository code
uses: actions/checkout@v3
- name: Generate Image Tag
run: |
REF_NAME=${{ github.ref_name }}
DOCKER_TAG="${REF_NAME//\//-}"
echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: david
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
file: Dockerfile
push: true
tags: |
ghcr.io/derdavidbohl/dirigent-spring:${{ env.DOCKER_TAG }}