-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Github Actions to build and release the images
For now, images are only build on manual trigger.
- Loading branch information
1 parent
4f6b3aa
commit 3cb4982
Showing
2 changed files
with
71 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build and Publish Docker Images | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
buildmatrix: | ||
name: Create Build Matrix | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: Set up matrix | ||
id: set-matrix | ||
run: | | ||
echo "matrix=$(curl https://download.dokuwiki.org/version | jq -c 'del(.master) | {release: [.[]]}')" >> $GITHUB_OUTPUT | ||
build: | ||
needs: buildmatrix | ||
name: Build Docker Image ${{ matrix.release.date }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: ${{fromJson(needs.buildmatrix.outputs.matrix)}} | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: splitbrain | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
cache-from: type=gha, scope=${{ github.workflow }} | ||
cache-to: type=gha, scope=${{ github.workflow }} | ||
tags: | | ||
dokuwiki/dokuwiki:${{ matrix.release.date }} | ||
dokuwiki/dokuwiki:${{ matrix.release.type }} | ||
${{ matrix.release.type == 'stable' && 'dokuwiki/dokuwiki:latest' || '' }} | ||
build-args: | | ||
DOKUWIKI_VERSION=${{ matrix.release.date }} |
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