Skip to content

Commit

Permalink
fix skopeo
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Jun 20, 2024
1 parent 176d927 commit c10dab3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-22.11
nix_path: nixpkgs=channel:nixos-24.05
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
Expand All @@ -31,8 +31,10 @@ jobs:
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: build and push image
run: |
REPO_NAME=${{ github.event.repository.name }}
TAG=${{ github.ref_name }}
REPO_NAME="${{ github.event.repository.name }}"
TAG="${{ github.ref_name }}"
OCI_ARCHIVE=$(nix build --no-link --print-out-paths .#testground-image)
echo $REPO_NAME $TAG $OCI_ARCHIVE
skopeo --insecure-policy copy --dest-creds="${REPO_NAME}:${{ secrets.GITHUB_TOKEN }}" "docker-archive:${OCI_ARCHIVE}" "docker://${REPO_NAME}/testground-image:${TAG}"
USERNAME="${{ github.actor }}"
echo "$REPO_NAME $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_NAME}/testground-image:${TAG}"

0 comments on commit c10dab3

Please sign in to comment.