repo rework
Some checks failed
Build and Push Docker Image / docker (push) Failing after 18s

This commit is contained in:
2026-04-08 12:36:00 +00:00
parent 30a86a5890
commit 2be781c3b1
109 changed files with 78389 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
docker:
runs-on: docker-host
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Log in to Docker Hub
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run:
echo "$DOCKERHUB_TOKEN" | docker login --username "$DOCKERHUB_USERNAME" --password-stdin
- name: Build image
env:
IMAGE_NAME: ${{ vars.DOCKERHUB_REPOSITORY }}
run: |
test -n "$IMAGE_NAME"
SHORT_SHA="$(git rev-parse --short HEAD)"
docker build -t "$IMAGE_NAME:latest" -t "$IMAGE_NAME:$SHORT_SHA" .
- name: Push image
env:
IMAGE_NAME: ${{ vars.DOCKERHUB_REPOSITORY }}
run: |
test -n "$IMAGE_NAME"
SHORT_SHA="$(git rev-parse --short HEAD)"
docker push "$IMAGE_NAME:latest"
docker push "$IMAGE_NAME:$SHORT_SHA"