Skip to content

fix repo

fix repo #3

Workflow file for this run

name: Push Testground Image
on:
push:
branches:
- main
tags:
- "v*.*.*"
env:
IMAGE_NAME: cronos-testground-image
jobs:
push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-24.05
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
with:
name: cronos
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: build and push image
run: |
REPO="${{ github.repository_owner }}"
TAG="${{ github.ref_name }}"
OCI_ARCHIVE=$(nix build --no-link --print-out-paths .#testground-image)
USERNAME="${{ github.actor }}"
echo "$REPO $TAG $OCI_ARCHIVE"
alias skopeo="nix shell nixpkgs#skopeo -c skopeo"
skopeo --insecure-policy copy --dest-creds="${USERNAME}:${{ secrets.GITHUB_TOKEN }}" "docker-archive:${OCI_ARCHIVE}" "docker://${REPO}/${IMAGE_NAME}:${TAG}"