Skip to content

Build phpcas-tester Docker image #12

Build phpcas-tester Docker image

Build phpcas-tester Docker image #12

Workflow file for this run

name: image-build
run-name: Build phpcas-tester Docker image
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- 'Dockerfile'
- 'apache/**'
- 'certs/**'
- 'code/**'
- 'php/**'
jobs:
image-build:
runs-on: ubuntu-latest
steps:
- name: Set timezone
uses: zcong1993/setup-timezone@master
with:
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@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push Base image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: gunet/phpcas-tester:latest
labels: gr.gunet.phpcas-tester.pushdate=${{ steps.date.outputs.env.push_date }}
cache-from: type=registry,ref=gunet/phpcas-tester:buildcache
cache-to: type=registry,ref=gunet/phpcas-tester:buildcache,mode=max