From 8cde1d476473cc84ae429baad3089febc412722a Mon Sep 17 00:00:00 2001 From: Ken Figueiredo Date: Tue, 1 Sep 2020 10:53:58 -0400 Subject: [PATCH] Add workflow for docker release (#82) * add gh release workflow --- .github/workflows/main.yml | 4 ++-- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 01b4fab..5fa0526 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,6 @@ -name: Docker CI +name: Docker Test Build -on: [push, pull_request] +on: [pull_request] jobs: apiary-docker-image: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8c971d9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Docker Release + +on: + push: + tags: + - v* + +jobs: + apiary-docker-image: + name: Apiary Docker Release + runs-on: ubuntu-18.04 + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Release Apiary Docker Image + uses: docker/build-push-action@v1.1.0 + with: + dockerfile: "Dockerfile" + always_pull: true + tag_with_ref: true + repository: expediagroup/apiary-metastore-core + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + push: ${{ startsWith(github.ref, 'refs/tags/') }} + + apiary-init-docker-image: + name: Apiary Init Container Docker Release + runs-on: ubuntu-18.04 + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Release Apiary Init Docker Image + uses: docker/build-push-action@v1.1.0 + with: + path: "initContainer" + dockerfile: "initContainer/Dockerfile" + always_pull: true + tag_with_ref: true + repository: expediagroup/apiary-metastore-init-container + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + push: ${{ startsWith(github.ref, 'refs/tags/') }}