Skip to content

Update base image refs to use competition fork images (#2) #5

Update base image refs to use competition fork images (#2)

Update base image refs to use competition fork images (#2) #5

name: Build and Push Latest Docker Images
on:
push:
branches:
- 'release/**'
pull_request:
branches:
- 'release/**'
release:
types: [published]
permissions:
contents: read
packages: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log into GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3
- name: Build and upload based on release cache, update cache
if: github.event_name == 'push'
run: |
infra/base-images/aixcc_build_all.sh --cache-to "${{ github.ref }}" "${{ github.sha }}"
- name: Build and upload based on release cache, no cache update
if: github.event_name == 'pull_request'
run: |
infra/base-images/aixcc_build_all.sh --cache-from "${{ github.base_ref }}" "${{ github.sha }}"
- name: Build and upload for release
if: github.event_name == 'release'
run: |
infra/base-images/aixcc_build_all.sh ${{ github.event.release.tag_name }}