Pass registry credentials via env instead of script interpolation

Template interpolation embeds the secret in the generated script file;
env indirection keeps it out of argv and off disk.
This commit is contained in:
2026-06-12 12:21:19 -04:00
parent 12a62a91cf
commit 13e9e88e0e
+5 -2
View File
@@ -17,9 +17,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Log in to registry - name: Log in to registry
env:
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: | run: |
echo "${{ secrets.REGISTRY_TOKEN }}" \ echo "$REGISTRY_TOKEN" \
| docker login -u "${{ secrets.REGISTRY_USER }}" --password-stdin git.weaselab.dev | docker login -u "$REGISTRY_USER" --password-stdin git.weaselab.dev
- name: Build and push image if changed - name: Build and push image if changed
run: | run: |