From 0179987aff7202d09baf109b955496abeb92833a Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 17 Nov 2022 13:27:56 -0500 Subject: [PATCH] gotta push to test minor tweaks. --- .github/workflows/backend_tests.yml | 3 ++- .github/workflows/create-docker-action.yml | 26 +++++++++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/backend_tests.yml b/.github/workflows/backend_tests.yml index d80dd8f3..42fb2359 100644 --- a/.github/workflows/backend_tests.yml +++ b/.github/workflows/backend_tests.yml @@ -1,7 +1,8 @@ name: Tests on: - - push + push: + branches: [ 'main' ] # just for testing for a bit. - pull_request defaults: diff --git a/.github/workflows/create-docker-action.yml b/.github/workflows/create-docker-action.yml index ebea974e..4ff91669 100644 --- a/.github/workflows/create-docker-action.yml +++ b/.github/workflows/create-docker-action.yml @@ -4,6 +4,11 @@ on: workflow_dispatch: push: branches: ['feature/releases'] # just for testing for a bit. + tags: + - 'v*' + pull_request: + branches: + - 'main' release: types: [published] @@ -21,23 +26,24 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: name/app + + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 - with: - images: ${{ env.REGISTRY }}/${{ env.BACKEND_IMAGE }} - - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@v3 with: context: . push: true