diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index e8a4af8c93..75e856233d 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -1,6 +1,37 @@ name: Daily build on: push: - # TODO: change to daily cron job + # schedule: + # - cron: "0 1 * * *" + # TODO: cron job deactivated for now branches: - 'CLOUDP-188862' + +jobs: + release_image: + name: Build and publish docker image + runs-on: ubuntu-latest + env: + IMAGE_REPOSITORY: mongodb/apix-test + PLATFORMS: linux/amd64,linux/arm64 + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: ${{ env.PLATFORMS }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + with: + platforms: ${{ env.PLATFORMS }} + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push container to Dockerhub + uses: docker/docker-push-action@v3 + with: + context: . + platforms: ${{ env.PLATFORMS }} + tags: ${{ env.env.IMAGE_REPOSITORY }}:mongodb-atlas-cli + push: true diff --git a/.github/workflows/my-test.yml b/.github/workflows/my-test.yml new file mode 100644 index 0000000000..41882d1191 --- /dev/null +++ b/.github/workflows/my-test.yml @@ -0,0 +1,20 @@ +name: Build CLI Docker image + +jobs: + build_test: + name: Publish docker image + runs-on: ubuntu-latest + strategy: + matrix: + golang: [ 1.19 ] + steps: + - name: Check out the repo + uses: actions/checkout@v3 + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.golang }} + - name: Build + run: make build-all + - name: Build Image + run: docker build -f Dockerfile_Test -t atlas-test --no-cache . \ No newline at end of file