mirror of
https://github.com/datahub-project/datahub.git
synced 2025-09-26 09:35:23 +00:00
simplify docker action
This commit is contained in:
parent
76a9564a6f
commit
e80ebf180c
@ -1,56 +0,0 @@
|
|||||||
name: datahub-ingest docker
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths-ignore:
|
|
||||||
- 'docs/**'
|
|
||||||
- '**.md'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'docker/**'
|
|
||||||
- '.github/workflows/docker-frontend.yml'
|
|
||||||
paths_ignore:
|
|
||||||
- '**.md'
|
|
||||||
- '**.env'
|
|
||||||
release:
|
|
||||||
types: [published, edited]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
setup:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
tag: ${{ steps.tag.outputs.tag }}
|
|
||||||
publish: ${{ steps.publish.outputs.publish }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- id: tag
|
|
||||||
run: |
|
|
||||||
echo "GITHUB_REF: $GITHUB_REF"
|
|
||||||
TAG=$(echo ${GITHUB_REF} | sed -e 's,refs/heads/master,latest,g' -e 's,refs/tags/,,g' -e 's,refs/pull/\([0-9]*\).*,pr\1,g')
|
|
||||||
echo "tag=$TAG"
|
|
||||||
echo "::set-output name=tag::$TAG"
|
|
||||||
- name: Check whether publishing enabled
|
|
||||||
id: publish
|
|
||||||
env:
|
|
||||||
ENABLE_PUBLISH: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
echo "Enable publish: ${{ env.ENABLE_PUBLISH != '' }}"
|
|
||||||
echo "::set-output name=publish::${{ env.ENABLE_PUBLISH != '' }}"
|
|
||||||
build-and-publish-dockerhub:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: setup
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: docker/build-push-action@v1
|
|
||||||
env:
|
|
||||||
DOCKER_BUILDKIT: 1
|
|
||||||
with:
|
|
||||||
dockerfile: ./docker/Dockerfile
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
repository: acryldata/designpartners
|
|
||||||
tags: ${{ needs.setup.outputs.tag }}
|
|
||||||
push: ${{ needs.setup.outputs.publish == 'true' }}
|
|
35
metadata-ingestion/.github/workflows/docker-ingest.yml
vendored
Normal file
35
metadata-ingestion/.github/workflows/docker-ingest.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: datahub-ingest docker
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'docker/**'
|
||||||
|
- '.github/workflows/docker-ingest.yml'
|
||||||
|
paths_ignore:
|
||||||
|
- '**.md'
|
||||||
|
- '**.env'
|
||||||
|
release:
|
||||||
|
types: [published, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
push_to_registries:
|
||||||
|
name: Push Docker image to repo
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Push to Docker Hub
|
||||||
|
- uses: docker/build-push-action@v1
|
||||||
|
- with:
|
||||||
|
dockerfile: ./docker/Dockerfile
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
repository: acryldata/designpartners
|
||||||
|
tag_with_ref: true
|
Loading…
x
Reference in New Issue
Block a user