From c9b1cad86cf7efeac3ec6f9864ddf71de40c8828 Mon Sep 17 00:00:00 2001 From: fastfist Date: Tue, 3 Oct 2023 10:46:52 -0500 Subject: [PATCH] devops: testing auto push docker image with tagging --- .github/workflows/push-docker.yml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/push-docker.yml diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml new file mode 100644 index 0000000000..e018322a4c --- /dev/null +++ b/.github/workflows/push-docker.yml @@ -0,0 +1,33 @@ + +# Create Docker images tagged based off commit +on: + # workflow_dispatch: + push: + # branches: + # - 'master' + # pull_request: + # branches: + # - 'master' + +jobs: + build_search: + name: Building Search Docker Image + runs-on: ubuntu-latest + steps: + - name: Checkout the repo + uses: actions/checkout@v4 + + - name: Login to Docker Hub + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + with: + context: search/ + file: ./Dockerfile + push: true + tags: ${{ vars.GITHUB_SHA }} + labels: ${{ steps.meta.outputs.labels }}