From 4d0c4f33f11132b23b1c3331936e09777578fd72 Mon Sep 17 00:00:00 2001 From: anomnaco Date: Mon, 26 Aug 2024 09:31:56 -0400 Subject: [PATCH 1/2] Adding Github Actions Workflow --- .github/build_and_push_docker_image.yml | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/build_and_push_docker_image.yml diff --git a/.github/build_and_push_docker_image.yml b/.github/build_and_push_docker_image.yml new file mode 100644 index 0000000..6b88dc4 --- /dev/null +++ b/.github/build_and_push_docker_image.yml @@ -0,0 +1,32 @@ +name: Docker Image CI + +on: + push: + branches: + - main + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + - uses: actions/checkout@v4 + + - name: Build the Docker image + run: docker build --tag cass-stac --no-cache . + + - name: Save images to tags + run: | + docker tag cass-stac anantcorp/cass-stac:${{ github.run_number }} + docker tag cass-stac anantcorp/cass-stac:latest + + - name: Push images to Docker Hub + run: | + echo "::add-mask::${{ secrets.DOCKERHUB_USER }}" + echo "::add-mask::${{ secrets.DOCKERHUB_TOKEN }}" + docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }} + docker push anantcorp/cass-stac:${{ github.run_number }} + docker push anantcorp/cass-stac:latest From 680541de04643ff7fa0cebe462a88e57e07fa4fb Mon Sep 17 00:00:00 2001 From: anomnaco Date: Mon, 26 Aug 2024 09:35:04 -0400 Subject: [PATCH 2/2] Fix folder structure --- .github/{ => workflows}/build_and_push_docker_image.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/build_and_push_docker_image.yml (100%) diff --git a/.github/build_and_push_docker_image.yml b/.github/workflows/build_and_push_docker_image.yml similarity index 100% rename from .github/build_and_push_docker_image.yml rename to .github/workflows/build_and_push_docker_image.yml