Skip to content

Build cert-req Docker image #27

Build cert-req Docker image

Build cert-req Docker image #27

Workflow file for this run

name: cert-req-build
run-name: Build cert-req Docker image
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- 'Dockerfile'
- 'server.cnf'
- 'scripts/**'
jobs:
image-build:
runs-on: ubuntu-latest
steps:
- name: Set timezone
run: sudo timedatectl set-timezone 'Europe/Athens'
- name: Get date
id: date
run: echo "push_date=$(date '+%H:%M@%d/%m/%Y')" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Base image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: gunet/cert-req:latest
labels: gr.gunet.cert-req.pushdate=${{ steps.date.outputs.push_date }}
cache-from: type=gha
cache-to: type=gha,mode=max