diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..dee3c12 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +on: + push: + branches: [main, test-me-*] + tags: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + - run: docker login --username "$DOCKER_USER" --password "$DOCKER_PASS" ghcr.io + env: + DOCKER_USER: ${{ github.actor }} + DOCKER_PASS: ${{ secrets.GITHUB_TOKEN }} + if: github.event_name != 'pull_request' + - uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + build-args: GOOGLE_CLOUD_GO_VERSION=23c02d92c7a1747068eb1fc57dddbad23907d614 + tags: | + ghcr.io/getsentry/cbtemulator:${{ github.sha }} + ghcr.io/getsentry/cbtemulator:latest diff --git a/Makefile b/Makefile deleted file mode 100644 index 8e5467c..0000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -VERSION := 23c02d92c7a1747068eb1fc57dddbad23907d614 - -build: - docker build -t us.gcr.io/sentryio/cbtemulator:$(VERSION) --build-arg=GOOGLE_CLOUD_GO_VERSION=$(VERSION) . - -# Ideally craft's set up to release to here, but some ops people -# have permissions to push to the sentryio project, and -# cbtemulator doesn't really need updates often. -publish: build - docker push us.gcr.io/sentryio/cbtemulator:$(VERSION)