Skip to content

Commit

Permalink
build(docker): build & publish docker images to GitHub Packages
Browse files Browse the repository at this point in the history
Will kepp publishing to Docker Hub meanwhile until all Dockerfiles have been updated to point to GitHub.
Fixes datahub-project#1548
  • Loading branch information
mars-lan committed Aug 2, 2020
1 parent 352eb3f commit 8c87747
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/docker-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ jobs:
if: ${{ github.repository == 'linkedin/datahub' }}
steps:
- uses: actions/checkout@v2
- uses: ypicard/get-branch-name-github-action@v1
id: tag
- uses: docker/build-push-action@v1
with:
dockerfile: ./docker/frontend/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: linkedin/datahub-frontend
tag_with_ref: true
- uses: VaultVulp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: ./docker/gms/Dockerfile
image-name: datahub-frontend
image-tag: ${{ steps.tag.outputs.tag }}
8 changes: 8 additions & 0 deletions .github/workflows/docker-gms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ jobs:
if: ${{ github.repository == 'linkedin/datahub' }}
steps:
- uses: actions/checkout@v2
- uses: ypicard/get-branch-name-github-action@v1
id: tag
- uses: docker/build-push-action@v1
with:
dockerfile: ./docker/gms/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: linkedin/datahub-gms
tag_with_ref: true
- uses: VaultVulp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: ./docker/gms/Dockerfile
image-name: datahub-gms
image-tag: ${{ steps.tag.outputs.tag }}
8 changes: 8 additions & 0 deletions .github/workflows/docker-mae-consumer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ jobs:
if: ${{ github.repository == 'linkedin/datahub' }}
steps:
- uses: actions/checkout@v2
- uses: ypicard/get-branch-name-github-action@v1
id: tag
- uses: docker/build-push-action@v1
with:
dockerfile: ./docker/mae-consumer/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: linkedin/datahub-mae-consumer
tag_with_ref: true
- uses: VaultVulp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: ./docker/gms/Dockerfile
image-name: datahub-mae-consumer
image-tag: ${{ steps.tag.outputs.tag }}
13 changes: 12 additions & 1 deletion .github/workflows/docker-mce-consumer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,24 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.repository == 'linkedin/datahub' }}
# if: ${{ github.repository == 'linkedin/datahub' }}
steps:
- uses: actions/checkout@v2
- id: tag
run: |
TAG=$(echo ${GITHUB_REF} | sed -e 's/refs\/heads\/master/latest/g' | sed -e 's/refs\/tags\///g')
echo "tag=$TAG"
echo "::set-output name=tag::$TAG"
- uses: docker/build-push-action@v1
with:
dockerfile: ./docker/mce-consumer/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: linkedin/datahub-mce-consumer
tag_with_ref: true
- uses: VaultVulp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dockerfile: ./docker/gms/Dockerfile
image-name: datahub-mce-consumer
image-tag: ${{ steps.tag.outputs.tag }}

0 comments on commit 8c87747

Please sign in to comment.