Create build-image.yml
This commit is contained in:
@@ -0,0 +1,38 @@
|
|||||||
|
name: Build and Push GTS-Federation Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # Manueller Start über den "Actions" Tab
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main # Baut auch automatisch, wenn du Code hochlädst
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: actions/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Generate Timestamp Tag
|
||||||
|
id: vars
|
||||||
|
run: echo "sha_short=$(date +%Y%m%d-%H%M)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
domoel/gts-federation:latest
|
||||||
|
domoel/gts-federation:${{ steps.vars.outputs.sha_short }}
|
||||||
|
no-cache: true
|
||||||
Reference in New Issue
Block a user