-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nicolas Hrubec
committed
Jul 12, 2023
1 parent
907516f
commit af3e98a
Showing
2 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 . |