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/') }}