Skip to content

Commit

Permalink
Add baseline release pipeline!
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Hrubec committed Jul 12, 2023
1 parent 907516f commit af3e98a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .github/workflows/docker-release.yml
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
20 changes: 20 additions & 0 deletions .github/workflows/my-test.yml
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 .

0 comments on commit af3e98a

Please sign in to comment.