-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Julius Härtl <[email protected]>
- Loading branch information
1 parent
71539b5
commit e2c56e4
Showing
2 changed files
with
85 additions
and
2 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,83 @@ | ||
name: Docker image | ||
|
||
on: | ||
push: | ||
branches: | ||
- ci/docker | ||
- main | ||
- master | ||
- stable* | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
# DOCKER_REPO: nextcloud/whiteboard | ||
GHCR_REPO: ghcr.io/nextcloud-releases/whiteboard | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
strategy: | ||
matrix: | ||
platform: | ||
- linux/amd64 | ||
- linux/arm64 | ||
|
||
steps: | ||
- name: Set vars | ||
id: vars | ||
run: | | ||
echo "version=daily" >> $GITHUB_OUTPUT | ||
echo "platform=$(echo -n ${{ matrix.platform }} | sed 's/\//-/g')" >> $GITHUB_OUTPUT | ||
- uses: actions/checkout@v3 | ||
- uses: docker/setup-qemu-action@v3 | ||
- uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Github Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build docker images | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
platforms: ${{ matrix.platform }} | ||
provenance: false | ||
tags: | | ||
${{ env.GHCR_REPO}}:${{ steps.vars.outputs.version }}-${{ steps.vars.outputs.platform }} | ||
release: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
needs: build | ||
|
||
steps: | ||
- name: Set vars | ||
id: vars | ||
run: | | ||
echo "version=daily" >> $GITHUB_OUTPUT | ||
- name: Login to Github Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create GHCR manifest | ||
run: | | ||
docker manifest create $GHCR_REPO:${{ steps.vars.outputs.version }} \ | ||
$GHCR_REPO:${{ steps.vars.outputs.version }}-linux-amd64 \ | ||
$GHCR_REPO:${{ steps.vars.outputs.version }}-linux-arm64 | ||
- name: Push manifests | ||
run: | | ||
docker manifest push $DOCKER_REPO:${{ steps.vars.outputs.version }} | ||
docker manifest push $GHCR_REPO:${{ steps.vars.outputs.version }} |
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