Skip to content

Commit

Permalink
Can we remove this buildah step? Looks like this make broken image
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Mar 9, 2024
1 parent d0b517d commit 10c0114
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}"

0 comments on commit 10c0114

Please sign in to comment.