Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "ci(docker): build multiplatform images on push to main or workflow dispatch" #37

Merged
merged 1 commit into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 13 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Proposal tests
# run on all PRs
on:
pull_request:
workflow_dispatch:
merge_group:
push:
branches: [main]
Expand Down Expand Up @@ -43,20 +42,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker multiplatform builds
run: |
DEFAULT_PLATFORM=linux/amd64
echo "DEFAULT_PLATFORM=$DEFAULT_PLATFORM" >> $GITHUB_ENV
if ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}; then
echo PLATFORMS=$DEFAULT_PLATFORM >> $GITHUB_ENV
else
echo PLATFORMS=linux/amd64,linux/arm64/v8 >> $GITHUB_ENV
fi

- name: Set up QEMU for cross-platform builds
uses: docker/setup-qemu-action@v3
if: ${{ env.PLATFORMS != env.DEFAULT_PLATFORM }}

- name: Log in to the Container registry
uses: docker/login-action@v3
# see https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
Expand All @@ -80,18 +65,24 @@ jobs:
./buildTestImages.ts
- name: run test images
run: ./runTestImages.ts

# XXX this should be instant for the local platform because all the stages
# were already built in the steps above but it's re-building the last
# stage. This is deemed good enough for now. see
# https://github.com/moby/moby/issues/34715
- name: Build and push images

# XXX this should be instant because all the stages were already built in the steps above
# but it's re-building the last stage. This is deemed good enough for now.
# see https://github.com/moby/moby/issues/34715
- name: Build and push complete image
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ env.PLATFORMS }}
# push to registry on every repo push. A PR #2 will push with tag `pr-2` and `main` will have tag `main`.
# See https://github.com/docker/metadata-action?tab=readme-ov-file#basic.
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./.github/actions/notify-status
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
from: ${{ secrets.NOTIFY_EMAIL_FROM }}
to: ${{ secrets.NOTIFY_EMAIL_TO }}
password: ${{ secrets.NOTIFY_EMAIL_PASSWORD }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Proposals run or planned for Mainnet (agoric-3)
This repo serves several functions:

- verify building an image with in which known proposals have executed
- publishing a multiplatform image with all passed proposals
- publishing an image with all passed proposals
- verify that certain tests pass after each proposal

# Design
Expand Down Expand Up @@ -90,9 +90,9 @@ To add a proposal, see [CONTRIBUTING.md](./CONTRIBUTING.md).

This repo publishes an image of the synthetic agoric-3 chain with all proposals that have "passed" (defined in this repo as having a proposal number).

The CI builds multiplatform images on every push to the trunk branch, (`main`), and for speed, only default worker platform images for PR branches. You can view all versions at https://github.com/agoric/agoric-3-proposals/pkgs/container/agoric-3-proposals/versions
The CI builds on every push to the trunk branch, (`main`), or a PR branch. You can view all versions at https://github.com/agoric/agoric-3-proposals/pkgs/container/agoric-3-proposals/versions

The multiplatform versions built from the main branch are at: `ghcr.io/agoric/agoric-3-proposals:main`. For each PR, default worker platform images are at a URL like `ghcr.io/agoric/agoric-3-proposals:pr-11`.
The versions built from the main branch are at: `ghcr.io/agoric/agoric-3-proposals:main`. For each PR, they're at a URL like `ghcr.io/agoric/agoric-3-proposals:pr-11`.

If you RUN this image, you'll get a working chain running `agd` until you terminate,

Expand Down