You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gobblin.apache.org by sh...@apache.org on 2020/11/30 00:00:46 UTC
[incubator-gobblin] branch master updated: [GOBBLIN-1313] Create
Github Action to automatically build and publish images
This is an automated email from the ASF dual-hosted git repository.
shirshanka pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git
The following commit(s) were added to refs/heads/master by this push:
new 7bb594e [GOBBLIN-1313] Create Github Action to automatically build and publish images
7bb594e is described below
commit 7bb594e1a4e5170a86b5a7da9830c2a3b34ddef3
Author: William Lo <wl...@linkedin.com>
AuthorDate: Sun Nov 29 16:00:31 2020 -0800
[GOBBLIN-1313] Create Github Action to automatically build and publish images
Closes #3151 from Will-Lo/github-action-generate-
docker
---
.github/workflows/docker_build_publish.yaml | 47 +++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/.github/workflows/docker_build_publish.yaml b/.github/workflows/docker_build_publish.yaml
new file mode 100644
index 0000000..0622d7e
--- /dev/null
+++ b/.github/workflows/docker_build_publish.yaml
@@ -0,0 +1,47 @@
+name: Build and Publish Docker image
+on:
+ push:
+ # Publish only on `master`
+ branches:
+ - master
+
+ # Publish `v1.2.3` tags as releases.
+ tags:
+ - v*
+
+env:
+ IMAGE_NAME: apache/gobblin
+
+jobs:
+ build_and_push_to_registry:
+ name: Build docker images and publish to DockerHub
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v2
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+ - name: Docker meta
+ id: docker_meta
+ uses: crazy-max/ghaction-docker-meta@v1
+ with:
+ images: ${{ env.IMAGE_NAME }} # list of Docker images to use as base name for tags
+ tag-sha: true # add git short SHA as Docker tag
+ - name: Login to DockerHub
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.DOCKERHUB_USER }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+# - name: Login to GitHub Container Registry
+# if: github.event_name != 'pull_request'
+# uses: docker/login-action@v1
+# with:
+# registry: ghcr.io
+# username: ${{ github.repository_owner }}
+# password: ${{ secrets.CR_PAT }}
+ - name: Build Images and Publish
+ uses: docker/build-push-action@v2
+ with:
+ tags: ${{ steps.docker_meta.outputs.tags }}, ${{ env.IMAGE_NAME }}:latest
+ push: true
+ file: ./gobblin-docker/gobblin-standalone/alpine-gobblin-latest/Dockerfile
\ No newline at end of file