mirror of https://code.forgejo.org/forgejo/runner
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>pull/27/head
commit
3a0a947017
|
@ -52,3 +52,4 @@ jobs:
|
|||
curl -L -sS $url/root/runner/releases/download/v1.2.3/forgejo-runner-amd64 > forgejo-runner
|
||||
chmod +x forgejo-runner
|
||||
./forgejo-runner --version | grep 1.2.3
|
||||
|
||||
|
|
|
@ -74,7 +74,9 @@ jobs:
|
|||
${{ steps.registry.outputs.buildx-config }}
|
||||
|
||||
- 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
|
||||
echo "{\"auths\": {\"$CI_REGISTRY\": {\"auth\": \"$BASE64_AUTH\"}}}" > ~/.docker/config.json
|
||||
env:
|
||||
|
@ -105,10 +107,22 @@ jobs:
|
|||
docker rm runner
|
||||
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:
|
||||
direction: upload
|
||||
release-dir: release
|
||||
release-notes: "RELEASE-NOTES#${{ steps.build.outputs.tag }}"
|
||||
token: ${{ steps.secrets.outputs.token }}
|
||||
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 New Issue