From 0fa5f8e89e1b64fce121edf89471678f88e11d3f Mon Sep 17 00:00:00 2001 From: Rahul Vijayakumar Date: Mon, 21 Oct 2024 23:29:49 +0530 Subject: [PATCH 1/2] Configured github actions to automatically build and push docker images to altacee container registry --- .github/workflows/docker.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..03ddc70 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,35 @@ +name: Build Docker Image + +on: + push: + branches: + - main + +jobs: + build: + steps: + # Checkout the repository + - name: Checkout code + uses: actions/checkout@v3 + + # Set up Docker Buildx (optional, for multi-platform builds) + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + # Log in to DockerHub (optional, if pushing to DockerHub) + - name: Log in to DockerHub + uses: docker/login-action@v2 + with: + registry: registry.altacee.com + username: ${{ secrets.ACR_USERNAME }} + password: ${{ secrets.ACR_PASSWORD }} + + # Build the Docker image + - name: Build Docker image + run: | + docker build -t registry.altacee.com/stratos/docs:latest . + + # Push the Docker image (optional, if you want to push to DockerHub) + - name: Push Docker image + run: | + docker push registry.altacee.com/stratos/docs:latest \ No newline at end of file From 94e21167c8b317d11e62638f2e563edd21de7ec4 Mon Sep 17 00:00:00 2001 From: Rahul Vijayakumar Date: Mon, 21 Oct 2024 23:31:53 +0530 Subject: [PATCH 2/2] fixed github actions workflow to build docker images --- .github/workflows/docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 03ddc70..29ef999 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,6 +7,7 @@ on: jobs: build: + runs-on: ubuntu-latest steps: # Checkout the repository - name: Checkout code