Skip to content

Commit

Permalink
ci: use skopeo in oci workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Jan 24, 2025
1 parent 42272cd commit dd95d92
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/wrpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,22 +364,22 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install `buildah`
run: nix profile install --inputs-from . 'nixpkgs#buildah'
- name: Install `skopeo`
run: nix profile install --inputs-from . 'nixpkgs#skopeo'

- name: Build `wrpc` image
run: nix run -L .#build-wrpc-oci wrpc
run: nix build -L .#wrpc-oci

- name: Test `wrpc` image
run: |
buildah push wrpc:$(nix eval --raw .#wrpc-x86_64-unknown-linux-musl-oci.imageTag) docker-daemon:wrpc:test
skopeo copy oci-archive:./result docker-daemon:wrpc:test
docker run --rm wrpc:test wit-bindgen-wrpc --version
- name: Push `wrpc` commit rev tag
if: startswith(github.ref, format('refs/tags/{0}v', matrix.prefix)) || github.ref == 'refs/heads/main'
run: |
buildah manifest push --all --format 'v2s2' wrpc docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:${{ github.sha }}
buildah manifest push --all --format 'v2s2' wrpc docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:${{ steps.ctx.outputs.sha_short }}
skopeo copy --all oci-archive:./result docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:${{ github.sha }}
skopeo copy --all oci-archive:./result docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:${{ steps.ctx.outputs.sha_short }}
docker run --rm ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:${{ github.sha }} wit-bindgen-wrpc --version
docker run --rm ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:${{ steps.ctx.outputs.sha_short }} wit-bindgen-wrpc --version
Expand All @@ -388,14 +388,14 @@ jobs:
if: startswith(github.ref, format('refs/tags/{0}v', matrix.prefix))
continue-on-error: ${{ github.repository_owner != 'bytecodealliance' }}
run: |
buildah manifest push --all --format 'v2s2' wrpc docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:${{ steps.ctx.outputs.version }}
skopeo copy --all oci-archive:./result docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:${{ steps.ctx.outputs.version }}
docker run --rm ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:${{ steps.ctx.outputs.version }} wit-bindgen-wrpc --version
- name: Push `wrpc` `latest` tag
if: startswith(github.ref, format('refs/tags/{0}v', matrix.prefix)) && !steps.ctx.outputs.prerelease
continue-on-error: ${{ github.repository_owner != 'bytecodealliance' }}
run: |
buildah manifest push --all --format 'v2s2' wrpc docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:latest
skopeo copy --all oci-archive:./result docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:latest
docker run --rm ghcr.io/${{ steps.ctx.outputs.owner }}/wrpc:latest wit-bindgen-wrpc --version
release:
Expand Down

0 comments on commit dd95d92

Please sign in to comment.