Compare commits

...

2 commits

Author SHA1 Message Date
2553362795
fix drone build
Some checks failed
continuous-integration/drone/push Build is failing
2023-08-17 12:46:46 -05:00
7d3d72821c
update build 2023-08-17 12:43:01 -05:00
2 changed files with 19 additions and 10 deletions

View file

@ -21,6 +21,15 @@ steps:
commands:
- nix build .#nixos-runner
- nix run .#push-container -- result
- podman load --input result | sed -n -e "s/Loaded image:.\\(.*\\)/\\1/p" > loaded-image
- cat loaded-image
- podman images
- podman tag "$(<loaded-image)" "${REGISTRY}/${REPOSITORY}:${GITHUB_RUN_NUMBER}-${GITHUB_SHA:0:8}"
- podman tag "$(<loaded-image)" "${REGISTRY}/${REPOSITORY}:latest"
- podman images
- podman push "${REGISTRY}/${REPOSITORY}:${GITHUB_RUN_NUMBER}-${GITHUB_SHA:0:8}"
- podman push "${REGISTRY}/${REPOSITORY}:latest"
- podman logout "${REGISTRY}"
settings:
registry: docker.io
repository: jcollie/nixos-runner

View file

@ -12,16 +12,16 @@ jobs:
- uses: actions/checkout@v3
- run: set
- run: nix build -L .#nixos-runner
# - uses: redhat-actions/podman-login@v1
# with:
# registry: ghcr.io/${{ github.repository_owner }}
# username: ${{ github.actor }}
# password: ${{ github.token }}
- run: echo -n "${PASSWORD}" | podman login --username ${USERNAME} --password-stdin ${REPOSITORY}
env:
REPOSITORY: ghcr.io/${{ github.repository_owner }}
USERNAME: ${{ github.actor }}
PASSWORD: ${{ github.token }}
- uses: redhat-actions/podman-login@v1
with:
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ github.token }}
# - run: echo -n "${PASSWORD}" | podman login --username ${USERNAME} --password-stdin ${REPOSITORY}
# env:
# REPOSITORY: ghcr.io/${{ github.repository_owner }}
# USERNAME: ${{ github.actor }}
# PASSWORD: ${{ github.token }}
- run: podman load --input result | sed -n -e "s/Loaded image:.\\(.*\\)/loaded-image=\\1/p" >> $GITHUB_OUTPUT
id: podman-load-image
- run: podman images