feat: push completed image #36
Workflow file for this run
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
name: Proposal tests | |
# run on all PRs | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: [master] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
# see https://docs.docker.com/build/ci/github-actions/test-before-push/ | |
test-proposals: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- name: free up disk space | |
run: | | |
# Workaround to provide additional free space for testing. | |
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 | |
# If this turns out not to be enough, maybe look instead at | |
# https://github.com/actions/runner-images/issues/2840#issuecomment-1540506686 | |
df -h | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
echo "=== After cleanup:" | |
df -h | |
- uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: agoric/agoric-3-proposals | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
# see https://docs.github.com/en/actions/publishing-packages/publishing-docker-images | |
with: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: ${{ env.REGISTRY }} | |
# The .ts scripts depend upon this | |
- run: yarn global add tsx | |
- name: build test images | |
run: ./buildTestImages.ts | |
- name: run test images | |
run: ./runTestImages.ts | |
# ??? does it push correctly? https://github.com/Agoric/agoric-3-proposals/actions/runs/6750864452/job/18353986038?pr=11 | |
# FIXME this is starting the build from scratch | |
# but this should be fast because all the stages were already built in the steps above | |
- name: Build and push complete image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
# Output to local Docker client to re-use the stages in the previous build step | |
load: true | |
# 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 }} |