This commit introduces a new step to the nix workflow that includes uploading the built image to a docker registry. It also tags the image and pushes it to the user's docker registry for easier access and use.
This commit is contained in:
parent
1fd6733cfc
commit
9a8ec862c2
|
@ -5,3 +5,10 @@ jobs:
|
|||
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 < 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"
|
||||
|
|
Loading…
Reference in a new issue