Merge pull request '[FORGEJO] secrets are trimmed from output, cope with it' (#25) from earl-warren/runner:wip-secrets into main
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/25 Reviewed-by: dachary <dachary@noreply.code.forgejo.org>
This commit is contained in:
commit
3a0a947017
2 changed files with 17 additions and 2 deletions
|
@ -52,3 +52,4 @@ jobs:
|
||||||
curl -L -sS $url/root/runner/releases/download/v1.2.3/forgejo-runner-amd64 > forgejo-runner
|
curl -L -sS $url/root/runner/releases/download/v1.2.3/forgejo-runner-amd64 > forgejo-runner
|
||||||
chmod +x forgejo-runner
|
chmod +x forgejo-runner
|
||||||
./forgejo-runner --version | grep 1.2.3
|
./forgejo-runner --version | grep 1.2.3
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,9 @@ jobs:
|
||||||
${{ steps.registry.outputs.buildx-config }}
|
${{ steps.registry.outputs.buildx-config }}
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
BASE64_AUTH=`echo -n "${{ steps.secrets.outputs.doer }}:${{ steps.secrets.outputs.token }}" | base64`
|
token="${{ steps.secrets.outputs.token }}" ; test -z "$token" && token="${{ secrets.TOKEN }}"
|
||||||
|
doer="${{ steps.secrets.outputs.doer }}" ; test -z "$doer" && doer="${{ secrets.DOER }}"
|
||||||
|
BASE64_AUTH=`echo -n "$doer:$token" | base64`
|
||||||
mkdir -p ~/.docker
|
mkdir -p ~/.docker
|
||||||
echo "{\"auths\": {\"$CI_REGISTRY\": {\"auth\": \"$BASE64_AUTH\"}}}" > ~/.docker/config.json
|
echo "{\"auths\": {\"$CI_REGISTRY\": {\"auth\": \"$BASE64_AUTH\"}}}" > ~/.docker/config.json
|
||||||
env:
|
env:
|
||||||
|
@ -105,10 +107,22 @@ jobs:
|
||||||
docker rm runner
|
docker rm runner
|
||||||
done
|
done
|
||||||
|
|
||||||
- uses: https://code.forgejo.org/actions/forgejo-release@v1
|
- name: publish release (when TOKEN secret is NOT set)
|
||||||
|
if: ${{ secrets.TOKEN == '' }}
|
||||||
|
uses: https://code.forgejo.org/actions/forgejo-release@v1
|
||||||
with:
|
with:
|
||||||
direction: upload
|
direction: upload
|
||||||
release-dir: release
|
release-dir: release
|
||||||
release-notes: "RELEASE-NOTES#${{ steps.build.outputs.tag }}"
|
release-notes: "RELEASE-NOTES#${{ steps.build.outputs.tag }}"
|
||||||
token: ${{ steps.secrets.outputs.token }}
|
token: ${{ steps.secrets.outputs.token }}
|
||||||
verbose: ${{ steps.verbose.outputs.value }}
|
verbose: ${{ steps.verbose.outputs.value }}
|
||||||
|
|
||||||
|
- name: publish release (when TOKEN secret is set)
|
||||||
|
if: ${{ secrets.TOKEN != '' }}
|
||||||
|
uses: https://code.forgejo.org/actions/forgejo-release@v1
|
||||||
|
with:
|
||||||
|
direction: upload
|
||||||
|
release-dir: release
|
||||||
|
release-notes: "RELEASE-NOTES#${{ steps.build.outputs.tag }}"
|
||||||
|
token: ${{ secrets.TOKEN }}
|
||||||
|
verbose: ${{ steps.verbose.outputs.value }}
|
||||||
|
|
Loading…
Reference in a new issue