ash258 / scoop-githubactions Goto Github PK
View Code? Open in Web Editor NEWDeprecated. Use https://github.com/shovel-org/GithubActions
License: MIT License
Deprecated. Use https://github.com/shovel-org/GithubActions
License: MIT License
Test result of (Get-content -raw $manifest.fullname) -eq ($object | ConvertToPrettyJson)
ConvertToPrettyJson
While running autoupdate it should be easy to match something like cannot extract hash
and reflect it in final comment.
- [x] Autoupdate
- [ ] Autoupdate
- Hash extraction failed
Invoke-GithubRequest {
...
$env:GH_REQ += $env:GH_REQ
...
}
As file will grow it will be nice to sanitize it into more modules
PR action should exit with nonzero code if there is some proble (block PR merging)
In other actions I feel comment is better than failed actions
Installation of manifests could be easily done. Only question about performance, build time is on deck.
This is pretty hard to handle as it require lots of manual checks.
It needs to be limited to 7z/zip files only.
Would it be more suitable to create scoop native binary for this?
This will save me lots of checks and my sanity.
If bucket do not have nested bucket folder fail and create new issue about this
/verify
to trigger action againTest-PRFile
function
Expected comment:
Thanks for contributing. Your PR did not pass requirements.
### Manifest 1
- [x] Description
- [ ] License
- [x] Hashes
- [x] Checkver
- [x] Autoupdate
### Manifest 2
- [x] Description
- [x] License
- [x] Hashes
- [x] Checkver
- [x] Autoupdate
Thanks for contributing. PR looks good.
Wait for review from human collaborators.
Implementation:
Best possible to temporary save into some hashtable:
@{name = 'Manifest1'; 'Checkver' = Passed; 'Properties': 'OK | list of failed properties'}
Maybe there is not needed to provide real email. Try with something like [email protected]
When PR is created from forked repository initial API call suffer from Resource not accessible by integration
Now:
https://github.com/Ash258/GithubActionsBucketForTesting/runs/184991649
Before:
In newer version of actions there is something wrong. It looks like that git config --global user.name $env:GITHUB_ACTOR
will be needed now.
Updating ...
hub pull origin master
From https://github.com/Ash258/GithubActionsBucketForTesting
* branch master -> FETCH_HEAD
Already up to date.
hub checkout master
Switched to a new branch 'master'
M .github/workflows/issue_comment.yml
M .github/workflows/issues.yml
M .github/workflows/pull_request.yml
M .github/workflows/schedule.yml
Branch 'master' set up to track remote branch 'master' from 'origin'.
Pushing updates ...
hub push origin master
fatal: could not read Username for 'https://github.com': No such device or address
^^^ Error! See above ^^^ (last command: hub push origin master)
& "$env:SCOOP_HOME\bin\scoop.ps1" install /github/workspace/bucket/jx.json
install_app 'jx' (default_architecture) $false $null $true $true
Trigger Pull request action when PR comment /verify
is added
https://developer.github.com/v3/issues/comments/
There should not be needed to pass Issue
(PR
, Scheduled
) as args.
$global:TYPE = $env:GITHUB_EVENT_NAME
Edit workflow files for all repositories
If there is no autoupdate.hash
just test causal urls.
$url.$_
)
.sha256
.sha1
.sha512
.md5
$baseurl/$fileNameNoExtension.$_
.sha256
.sha1
.sha512
.md5
$baseurl/$_
SHA256SUMS
, SHA256SUMS.txt
SHA512SUMS
, SHA512SUMS.txt
checksums.txt
latest.yml
If there are any, add new status with message that autoupdate hash is possible
Aria2 usage is now initialized. There are few problems that needs to be investigated
Starting download with aria2 ...
Exception caught
Exception: [download_helper.cc:563] errorCode=1 Failed to open the file /SCOOP/cache\xmake.txt, cause: File not found or it is a directory
ERROR Download failed! (Error 1) An unknown error occurred
ERROR https://github.com/xmake-io/xmake/releases/download/v2.2.7/xmake-v2.2.7.win64.zip
referer=https://github.com/xmake-io/xmake/releases/download/v2.2.7/
dir=/SCOOP/cache
out=xmake#DL#https_github.com_xmake-io_xmake_releases_download_v2.2.7_xmake-v2.2.7.win64.zip
ERROR & '/usr/bin/aria2c' --input-file='/SCOOP/cache\xmake.txt' --user-agent='Scoop/1.0 (+http://scoop.sh/) PowerShell/6.2 (Windows NT 4.9; Core)' --allow-overwrite=true --auto-file-renaming=false --retry-wait=2 --split=5 --max-connection-per-server=5 --min-split-size=5M --console-log-level=warn --enable-color=false --no-conf=true --follow-metalink=true --metalink-preferred-protocol=https --min-tls-version=TLSv1.2 --stop-with-process=1 --continue
The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.
+ & "$env:COMSPEC" /c $cmd
+ CategoryInfo : InvalidOperation: (:String) [], RuntimeException
+ FullyQualifiedErrorId : BadExpression
Please try again or create a new issue by using the following link and paste your console output:
https:////
PS /> ls /SCOOP/cache/
xmake.txt
PS /> cat /SCOOP/cache/xmake.txt
https://github.com/xmake-io/xmake/releases/download/v2.2.7/xmake-v2.2.7.win64.zip
referer=https://github.com/xmake-io/xmake/releases/download/v2.2.7/
dir=/SCOOP/cache
out=xmake#DL#https_github.com_xmake-io_xmake_releases_download_v2.2.7_xmake-v2.2.7.win64.zip
For some reason when url contains rewrite (#/dl.7z
) it will result as broken URL.
Broken, which should be OK
Ash258/GithubActionsBucketForTesting#164
When there is no rewrite it is OK.
Ash258/GithubActionsBucketForTesting#162
There is possible that hash will differ when new version is released (and URL is static; CCleaner stuff for example)
It would be good to first run checkver, wait for result.
- [ ] License
- [ ] Valid SPDX Identifier
- [ ] Invalid + URL
$Indent
switch to new-checklistitem
functionhttps://github.com/Ash258/scoop-Ash258/runs/165121799
This could prevent logs being saved at full length.
Count or just long line of manifests could be enough.
Create proper examples
Check what happen if there are no manifests changed. Only binaries for example
Automatic pushing of hash fails should not be prohibited for obviouse reasons.
PR creation should be better approach
Add all possible events into events
folder
verified
, package-fix-needed
opened, commented with special comment
PR Workflow could be triggered with adding label TRIGGER ...
Investigate if I can push to repository from action container with just GITHUB_TOKEN
Please see run log for pure result of all checks
Initial version (1.0.0) will contain main functionalities for automatic responses and time savers for maintainers.
Hash check fails validator
Download failed validator
New manifest in PR validation
"Excavator"
Polish README
Polish posted comments before first release
Release and tag initial version
1.0.0
tag requirements
Protect Master
stable
branch, which will be almost equal with master
Register official action to marketplace
Adopt in buckets
It would be nice if on
property could be more detailed. Report to github and wait for response
Instead of issue_comment
could be issue_comment.created
Add check for label existence before removing / adding them.
Issue action could be triggered via label added.
verify
label is the most suitable for this
New generic function with support for nested objects is needed for more advanced checks.
New-CheckList {
param([Hashtable] $Statuses)
return New-Array # String
}
$statuses = @{
Alfa = $true
Cosi = @{
Ahoj = $true
AhojA = $true
}
Broken = @{
Hello = $false
COSi = $true
}
}
This object will result in:
- [x] Alfa
- [x] Cosi
- [x] Ahoj
- [x] AhojA
- [ ] Broken
- [ ] Hello
- [x] COsi
Actions will be globally released on November 13
HCL will be deprecated in favour of YAML.
https://developer.github.com/actions
https://help.github.com/en/articles/migrating-github-actions-from-hcl-syntax-to-yaml-syntax
TODO:
JetBrains
SysInternals
GenericBucket
Ash258
Sanitize events folder:
If repository contains protected master it will need to provide ssh key as secret.
if ($env:SSH_KEY) {
Set-Content "$HOME\.ssh\id_rsa" $env:SSH_KEY -Encoding ASCII
} else {
git config remote-url ... $user:$token
}
If it will work. Note, example and instructions how to add have to be added into Readme.
If loaded manifest and version parsed from issue title does not match post some comment Latest version of manifest is <ver>. You reported different version. Please run scoop update and then try again.
On push it could handle various things:
Relate: ScoopInstaller/Scoop#2667
ππππ Button is finally available ππππ
On saturday there is need to be new release with marketplace. #32 Is good candidate for readme updates, which is pretty easy to fix
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.