From 10c01140aaa750525f777d9cd166035670a7b084 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sat, 9 Mar 2024 13:44:16 +0900 Subject: [PATCH] Can we remove this buildah step? Looks like this make broken image --- .github/workflows/container.yml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 63ddcf2b..0e435b03 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -91,33 +91,17 @@ jobs: [ -n "$container_name" ] podman exec --user=user --workdir='/home/user' -it "$container_name" '/home/user/.nix-profile/bin/zsh' -c la podman kill "$container_name" - - name: Finalize the image - id: build-image - uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 #v2.13 - with: - image: home - base-image: ran-nix-commands-by-user - tags: latest ${{ github.sha }} ${{ needs.get-meta.outputs.started_at }} - oci: true - - name: Test output image - run: | - set -euxo pipefail - podman run --rm ${{ steps.build-image.outputs.image }} & - sleep 1 - container_name="$(podman ps --sort=created --format '{{.Names}}' | tail -1)" - [ -n "$container_name" ] - podman exec --user=user --workdir='/home/user' -it "$container_name" '/home/user/.nix-profile/bin/zsh' -c la - podman kill "$container_name" - name: Push To ghcr.io + # if: ${{ github.event_name != 'pull_request' }} id: push-to-ghcr if: ${{ github.event_name != 'pull_request' }} uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c #v2.8 with: - image: ${{ steps.build-image.outputs.image }} - tags: ${{ steps.build-image.outputs.tags }} + image: ran-nix-commands-by-user + tags: latest ${{ github.sha }} ${{ needs.get-meta.outputs.started_at }} registry: ghcr.io/${{ github.repository_owner }} username: ${{ github.repository_owner }} password: ${{ github.token }} - name: Log pushed outputs - if: ${{ github.event_name != 'pull_request' }} + # if: ${{ github.event_name != 'pull_request' }} run: echo "${{ toJSON(steps.push-to-ghcr.outputs) }}"