docker-node-red/.github/workflows/build.yaml

28 lines
781 B
YAML

name: Build and push nixos-based docker container
on: [push]
env:
REGISTRY: git.strudelline.net
PACKAGE: cascade/docker-node-red
REGISTRY_AUTH_FILE: ./registry-auth.json
jobs:
build:
runs-on: nix
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 1
- run: |-
set -x
skopeo login --username ${{ secrets.DOCKER_USER }} --password ${{ secrets.DOCKER_PASSWORD }} "$REGISTRY"
( # echo tags into the image uploader's read loop
echo "sha-$(echo "$GITHUB_SHA" | cut -c 1-8)"
echo "$GITHUB_REF_NAME-$(date +%Y%m%d-%H%M%S)"
) | while read -r TAG;do
nix run .#upload-image "docker://$REGISTRY/$PACKAGE:$TAG"
done