This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/libcloud-site.git
The following commit(s) were added to refs/heads/master by this push:
new bc15d7b Add WIP GHA workflow for building website development docker
image.
bc15d7b is described below
commit bc15d7b060deb0e309a2cc96fc25e97560d03bb2
Author: Tomaz Muraus <[email protected]>
AuthorDate: Wed Mar 30 21:03:04 2022 +0200
Add WIP GHA workflow for building website development docker image.
---
.github/workflows/build_docker_image.yaml | 68 +++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/.github/workflows/build_docker_image.yaml
b/.github/workflows/build_docker_image.yaml
new file mode 100644
index 0000000..dc67e10
--- /dev/null
+++ b/.github/workflows/build_docker_image.yaml
@@ -0,0 +1,68 @@
+# Workflow which builds are publishes Docker image used for website
development.
+# Pre-built image can speed up the development since user doesn't need to
build it
+# locally first.
+name: Build Docker Image
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+ schedule:
+ - cron: '0 1 * * *'
+
+jobs:
+ # Special job which skips duplicate jobs
+ pre_job:
+ name: Skip Duplicate Jobs Pre Job
+ runs-on: ubuntu-latest
+ # Map a step output to a job output
+ outputs:
+ should_skip: ${{ steps.skip_check.outputs.should_skip }}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@master
+ with:
+ fetch-depth: 1
+
+ - id: skip_check
+ # NOTE: We store action as submodule since ASF doesn't allow directly
referencing external
+ # actions
+ uses: ./.github/actions/skip-duplicate-actions # v3.4.1
+ with:
+ github_token: ${{ github.token }}
+
+ build_docker_image:
+ name: Build Docker Image
+ runs-on: ubuntu-latest
+ timeout-minutes: 8
+
+ needs: pre_job
+ if: ${{ needs.pre_job.outputs.should_skip == 'false' || github.ref ==
'refs/heads/master' }}
+
+ steps:
+ - uses: actions/checkout@master
+ with:
+ fetch-depth: 1
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v1
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+
+ # - name: Login to DockerHub
+ # uses: docker/login-action@v1
+ # with:
+ # username: ${{ secrets.DOCKERHUB_USERNAME }}
+ # password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Build and push
+ uses: docker/build-push-action@v2
+ with:
+ context: .
+ platforms: linux/amd64,linux/arm64
+ push: false
+ tags: libcloud-dev/libcloud-website-dev:latest