feat(Pipeline): added
Some checks are pending
Build the Docker Image / build (push) Waiting to run

This commit is contained in:
Paul Fey 2025-04-21 12:15:00 +02:00
parent 040aa2c66c
commit b169fd9109

View file

@ -0,0 +1,27 @@
name: Build the Docker Image
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Generate timestamp
run: echo "TIMESTAMP=$(date +%s)" >> $GITHUB_ENV
- name: Build the Docker image
run: docker build . --file Dockerfile --tag "${{ secrets.DOCKER_USERNAME }}"/jekyll-blog:${TIMESTAMP} --tag "${{ secrets.DOCKER_USERNAME }}"/jekyll-blog:latest
- name: Push the Docker image
run: docker push -a "${{ secrets.DOCKER_USERNAME }}"/jekyll-blog