generated from Templates/Baseline
add upload command #3
@ -11,12 +11,18 @@ steps:
|
|||||||
test-next:
|
test-next:
|
||||||
image: gitea.ocram85.com/plugins/gitea-package:next
|
image: gitea.ocram85.com/plugins/gitea-package:next
|
||||||
pull: true
|
pull: true
|
||||||
|
secrets: [ gitea_user, gitea_passwd]
|
||||||
settings:
|
settings:
|
||||||
|
user:
|
||||||
|
from_secret: gitea_user
|
||||||
|
password:
|
||||||
|
from_secret: gitea_passwd
|
||||||
debug: "true"
|
debug: "true"
|
||||||
owner: "testuser"
|
owner: "testuser"
|
||||||
package_name: "dummy_package"
|
package_name: "dummy_package"
|
||||||
package_version: "0.1.0"
|
package_version: "0.1.0"
|
||||||
file_name: "./README.md"
|
file_source: "./README.md"
|
||||||
|
file_name: "readme.md"
|
||||||
update: "true"
|
update: "true"
|
||||||
when:
|
when:
|
||||||
event: pull_request
|
event: pull_request
|
||||||
|
@ -43,13 +43,14 @@ showSettings() {
|
|||||||
say "PLUGIN_PACKAGE_NAME: $PLUGIN_PACKAGE_NAME" "showSettings"
|
say "PLUGIN_PACKAGE_NAME: $PLUGIN_PACKAGE_NAME" "showSettings"
|
||||||
say "PLUGIN_PACKAGE_VERSION: $PLUGIN_PACKAGE_VERSION" "showSettings"
|
say "PLUGIN_PACKAGE_VERSION: $PLUGIN_PACKAGE_VERSION" "showSettings"
|
||||||
say "PLUGIN_FILE_NAME: $PLUGIN_FILE_NAME" "showSettings"
|
say "PLUGIN_FILE_NAME: $PLUGIN_FILE_NAME" "showSettings"
|
||||||
|
say "PLUGIN_FILE_SOURCE: $PLUGIN_FILE_SOURCE" "showSettings"
|
||||||
say "PLUGIN_UPDATE: $PLUGIN_UPDATE" "showSettings"
|
say "PLUGIN_UPDATE: $PLUGIN_UPDATE" "showSettings"
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadArtifact() {
|
uploadArtifact() {
|
||||||
curl --user your_username:your_password_or_token \
|
curl --user "$PLUGIN_USER:$PLUGIN_PASSWORD" \
|
||||||
--upload-file path/to/file.bin \
|
--upload-file "$PLUGIN_FILE_SOURCE" \
|
||||||
https://gitea.example.com/api/packages/testuser/generic/test_package/1.0.0/file.bin
|
"$CI_FORGE_URL/api/packages/$PLUGIN_OWNER/generic/$PLUGIN_PACKAGE_NAME/$PLUGINPACKAGE_VERSION/$PLUGIN_FILE_NAME"
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
@ -58,8 +59,8 @@ main() {
|
|||||||
showSettings
|
showSettings
|
||||||
sayW "Available ENV vars:"
|
sayW "Available ENV vars:"
|
||||||
showENV
|
showENV
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
uploadArtifact
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user