mirror of
https://codeberg.org/Cyborus/forgejo-cli.git
synced 2024-11-10 12:09:33 +01:00
Merge pull request 'forgejo instance agnostic deployment' (#27) from agnostic into main
Reviewed-on: https://codeberg.org/Cyborus/forgejo-cli/pulls/27
This commit is contained in:
commit
41035c1185
1 changed files with 7 additions and 5 deletions
|
@ -25,16 +25,18 @@ steps:
|
||||||
deploy-container:
|
deploy-container:
|
||||||
image: gcr.io/kaniko-project/executor:debug
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
commands:
|
commands:
|
||||||
- export AUTH="$(echo -n Cyborus:$TOKEN | base64)"
|
- export FORGE_HOST=$(echo $CI_FORGE_URL | sed -E 's_^https?://__')
|
||||||
- echo "{\"auths\":{\"codeberg.org\":{\"auth\":\"$AUTH\"}}}" > "/kaniko/.docker/config.json"
|
- export AUTH="$(echo -n $CI_REPO_OWNER:$TOKEN | base64)"
|
||||||
- executor --context ./ --dockerfile ./Dockerfile --destination "codeberg.org/cyborus/forgejo-cli:latest"
|
- echo "{\"auths\":{\"$FORGE_HOST\":{\"auth\":\"$AUTH\"}}}" > "/kaniko/.docker/config.json"
|
||||||
|
- export CONTAINER_OWNER=$(echo $CI_REPO_OWNER | awk '{print tolower($0)}')
|
||||||
|
- executor --context ./ --dockerfile ./Dockerfile --destination "$FORGE_HOST/$CONTAINER_OWNER/forgejo-cli:latest"
|
||||||
secrets: [ token ]
|
secrets: [ token ]
|
||||||
release:
|
release:
|
||||||
image: codeberg.org/cyborus/forgejo-cli:latest
|
image: codeberg.org/cyborus/forgejo-cli:latest
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- fj auth add-key codeberg.org Cyborus $TOKEN
|
- fj auth add-key $FORGE_HOST $CI_REPO_OWNER $TOKEN
|
||||||
- fj --remote $CI_REPO_URL release create $VERSION --create-tag --branch $BRANCH --attach forgejo-cli-windows.zip --attach forgejo-cli-windows.gz
|
- fj --remote $CI_REPO_URL release create $VERSION --create-tag --branch $BRANCH --attach forgejo-cli-windows.zip --attach forgejo-cli-windows.gz
|
||||||
- fj auth logout codeberg.org
|
- fj auth logout $FORGE_HOST
|
||||||
secrets: [ token ]
|
secrets: [ token ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue