-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.27 KB
/
dockerhub.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- 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@v4
with:
push: true
tags: vincowl/dokuwiki:latest, vincowl/dokuwiki:${{ steps.dw-version.outputs.dw-version}}
- name: Update DockerHub description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: vincowl/dokuwiki
short-description: ${{ github.event.repository.description }}