Skip to content

Build Docker Images #1191

Build Docker Images

Build Docker Images #1191

Workflow file for this run

name: Build Docker Images
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
dockerhub:
runs-on: ubuntu-latest
steps:
- name: checkout sources
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get grav version
id: grav-version
run: echo "::set-output name=grav-version::$(curl -sX GET "https://api.github.com/repos/getgrav/grav/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[\"\"]')"
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: vincowl/grav-php-nginx-v2:latest, vincowl/grav-php-nginx-v2:${{ steps.grav-version.outputs.grav-version }}
- name: Update DockerHub description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: vincowl/grav-php-nginx-v2
short-description: ${{ github.event.repository.description }}