mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-02-21 22:34:29 +00:00
Add push-oras-tarball-cache workflow that runs on push to main when versions.yaml changes (and on workflow_dispatch). It populates the ghcr.io ORAS cache with gperf and busybox tarballs from versions.yaml. Remove the push_to_cache call from download-with-oras-cache.sh since it was never triggered in CI. Cache population is now done solely by the new workflow and by populate-oras-tarball-cache.sh when run manually. Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
# Push gperf and busybox tarballs to the ORAS cache (ghcr.io) so that
|
|
# download-with-oras-cache.sh can pull them instead of hitting upstream.
|
|
# Runs when versions.yaml changes on main (e.g. after a PR merge) or manually.
|
|
name: CI | Push ORAS tarball cache
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'versions.yaml'
|
|
workflow_dispatch:
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
push-oras-cache:
|
|
name: push-oras-cache
|
|
runs-on: ubuntu-22.04
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Install yq
|
|
run: ./ci/install_yq.sh
|
|
|
|
- name: Install ORAS
|
|
uses: oras-project/setup-oras@22ce207df3b08e061f537244349aac6ae1d214f6 # v1.2.4
|
|
with:
|
|
version: "1.2.0"
|
|
|
|
- name: Populate ORAS tarball cache
|
|
run: ./tools/packaging/scripts/populate-oras-tarball-cache.sh all
|
|
env:
|
|
ARTEFACT_REGISTRY: ghcr.io
|
|
ARTEFACT_REPOSITORY: kata-containers
|
|
ARTEFACT_REGISTRY_USERNAME: ${{ github.actor }}
|
|
ARTEFACT_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|