nix-runner-container/.forgejo/workflows/nix.yaml
Harald Hoyer ca3c611075 fix: modify docker load command in nix.yaml workflow
- Change the docker load command to include -i flag which specifies the input file from which to load the image/archive. This corrects the formation of the IMAGE_TAG.
2024-06-27 15:32:40 +02:00

15 lines
600 B
YAML

on: [push]
jobs:
build:
runs-on: nix
steps:
- uses: actions/checkout@v3
- run: nix build -L .#runner
- name: upload image
run: |
docker login -u ${{ secrets.REG_USER }} -p ${{ secrets.REG_TOKEN }} ${{ secrets.CI_REGISTRY }}
export IMAGE_TAG=$(docker load -i result | grep -Po 'Loaded image.*: \K.*')
echo "Pushing image ${IMAGE_TAG}"
docker tag "${IMAGE_TAG}" "${{ secrets.CI_REGISTRY }}/${{ secrets.REG_USER }}/nix-runner:latest"
docker push "${{ secrets.CI_REGISTRY }}/${{ secrets.REG_USER }}/nix-runner:latest"