Build Docker Images #1194
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Login to Docker Hub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get Dokuwiki version | |
id: dw-version | |
run: echo "::set-output name=dw-version::$(curl -sX GET https://bitbucket.org/mprasil/docker_dokuwiki/raw/HEAD/Dockerfile | grep 'DOKUWIKI_VERSION=' | awk '{print $2}' FS='[=]')" | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: vincowl/dokuwiki:latest, vincowl/dokuwiki:${{ steps.dw-version.outputs.dw-version}} | |
- name: Update DockerHub description | |
uses: peter-evans/dockerhub-description@v4 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
repository: vincowl/dokuwiki | |
short-description: ${{ github.event.repository.description }} |