GithubHelp home page GithubHelp logo

christian-korneck / delete-run-artifacts-action Goto Github PK

View Code? Open in Web Editor NEW
27.0 3.0 9.0 515 KB

github action to delete artifacts at the end of a workflow run

License: MIT License

JavaScript 98.44% Shell 1.56%
github-actions github-workflow artifact artifacts artifacts-deletion github

delete-run-artifacts-action's People

Contributors

christian-korneck avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

delete-run-artifacts-action's Issues

Error: Resource not accessible by integration

action fails with this in the log:

Error: Resource not accessible by integration
⚠️ error in run: Resource not accessible by integration

i'll check if this is fixed by changing the permissions in the yml and if so open a PR to say so in the readme

Dispatch Workflow not Running

Hello and nice work! I wish there was a more native way to do this...
I've attempted implementing your solution. However, the dispatch workflow never runs after the API call in my main workflow. Here is the log from the main workflow. Any clues?

2020-03-28T03:54:59.9073518Z ##[section]Starting: Request a runner to run this job
2020-03-28T03:55:00.2218912Z Requesting a hosted runner in current repository's enterprise with labels: 'ubuntu-latest', require runner match: True
2020-03-28T03:55:00.3030318Z Labels matched hosted runners has been found, waiting for one of them get assigned for this job.
2020-03-28T03:55:00.3354144Z ##[section]Finishing: Request a runner to run this job
2020-03-28T03:55:04.2037814Z Current runner version: '2.165.2'
2020-03-28T03:55:04.2038823Z Prepare workflow directory
2020-03-28T03:55:04.2229649Z Prepare all required actions
2020-03-28T03:55:04.2749511Z ##[group]Run echo ::add-mask::***
2020-03-28T03:55:04.2750146Z �[36;1mecho ::add-mask::***�[0m
2020-03-28T03:55:04.2750369Z �[36;1mcurl --verbose --fail --show-error --location --request \�[0m
2020-03-28T03:55:04.2750698Z �[36;1m  POST "https://api.github.com/repos/turnercode/cn-games_multi_dodge-squad/dispatches" \�[0m
2020-03-28T03:55:04.2751155Z �[36;1m  --header "Authorization: token ***" \�[0m
2020-03-28T03:55:04.2751365Z �[36;1m  --header 'Content-Type: application/json' \�[0m
2020-03-28T03:55:04.2751578Z �[36;1m  --header 'Accept: application/vnd.github.everest-preview+json' \�[0m
2020-03-28T03:55:04.2751882Z �[36;1m  --data-raw "{\"event_type\": \"delete_all_artifacts\", \"client_payload\": {\"parent_runid\": \"65086352\", \"parent_repo\": \"turnercode/cn-games_multi_dodge-squad\"}}"�[0m
2020-03-28T03:55:05.0122320Z shell: /bin/bash -e {0}
2020-03-28T03:55:05.0122689Z ##[endgroup]
2020-03-28T03:55:06.0601815Z Note: Unnecessary use of -X or --request, POST is already inferred.
2020-03-28T03:55:06.0603219Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2020-03-28T03:55:06.0610448Z                                  Dload  Upload   Total   Spent    Left  Speed
2020-03-28T03:55:06.0610612Z 
2020-03-28T03:55:06.0611278Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 140.82.114.5...
2020-03-28T03:55:06.0611558Z * TCP_NODELAY set
2020-03-28T03:55:06.0611872Z * Connected to api.github.com (140.82.114.5) port 443 (#0)
2020-03-28T03:55:06.0612202Z * ALPN, offering h2
2020-03-28T03:55:06.0612452Z * ALPN, offering http/1.1
2020-03-28T03:55:06.0612761Z * successfully set certificate verify locations:
2020-03-28T03:55:06.0613670Z *   CAfile: /etc/ssl/certs/ca-certificates.crt
2020-03-28T03:55:06.0614133Z   CApath: /etc/ssl/certs
2020-03-28T03:55:06.0614364Z } [5 bytes data]
2020-03-28T03:55:06.0614629Z * TLSv1.3 (OUT), TLS handshake, Client hello (1):
2020-03-28T03:55:06.0614874Z } [512 bytes data]
2020-03-28T03:55:06.0615115Z * TLSv1.3 (IN), TLS handshake, Server hello (2):
2020-03-28T03:55:06.0615398Z { [122 bytes data]
2020-03-28T03:55:06.0615648Z * TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
2020-03-28T03:55:06.0615889Z { [1 bytes data]
2020-03-28T03:55:06.0616238Z * TLSv1.3 (IN), TLS handshake, Unknown (8):
2020-03-28T03:55:06.0616472Z { [25 bytes data]
2020-03-28T03:55:06.0616703Z * TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
2020-03-28T03:55:06.0617013Z { [1 bytes data]
2020-03-28T03:55:06.0617244Z * TLSv1.3 (IN), TLS handshake, Certificate (11):
2020-03-28T03:55:06.0617515Z { [2856 bytes data]
2020-03-28T03:55:06.0617751Z * TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
2020-03-28T03:55:06.0618361Z { [1 bytes data]
2020-03-28T03:55:06.0618620Z * TLSv1.3 (IN), TLS handshake, CERT verify (15):
2020-03-28T03:55:06.0618856Z { [264 bytes data]
2020-03-28T03:55:06.0619106Z * TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
2020-03-28T03:55:06.0619340Z { [1 bytes data]
2020-03-28T03:55:06.0619580Z * TLSv1.3 (IN), TLS handshake, Finished (20):
2020-03-28T03:55:06.0619867Z { [36 bytes data]
2020-03-28T03:55:06.0620118Z * TLSv1.3 (OUT), TLS change cipher, Client hello (1):
2020-03-28T03:55:06.0620355Z } [1 bytes data]
2020-03-28T03:55:06.0621227Z * TLSv1.3 (OUT), TLS Unknown, Certificate Status (22):
2020-03-28T03:55:06.0652193Z } [1 bytes data]
2020-03-28T03:55:06.0694978Z * TLSv1.3 (OUT), TLS handshake, Finished (20):
2020-03-28T03:55:06.0711140Z } [36 bytes data]
2020-03-28T03:55:06.0711865Z * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
2020-03-28T03:55:06.0712580Z * ALPN, server accepted to use http/1.1
2020-03-28T03:55:06.0713255Z * Server certificate:
2020-03-28T03:55:06.0713824Z *  subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.com
2020-03-28T03:55:06.0724161Z *  start date: Jul  8 00:00:00 2019 GMT
2020-03-28T03:55:06.0725070Z *  expire date: Jul 16 12:00:00 2020 GMT
2020-03-28T03:55:06.0726210Z *  subjectAltName: host "api.github.com" matched cert's "*.github.com"
2020-03-28T03:55:06.0726769Z *  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
2020-03-28T03:55:06.0727268Z *  SSL certificate verify ok.
2020-03-28T03:55:06.0727630Z } [5 bytes data]
2020-03-28T03:55:06.0728244Z * TLSv1.3 (OUT), TLS Unknown, Unknown (23):
2020-03-28T03:55:06.0728985Z } [1 bytes data]
2020-03-28T03:55:06.0729565Z > POST /repos/turnercode/cn-games_multi_dodge-squad/dispatches HTTP/1.1
2020-03-28T03:55:06.0729994Z > Host: api.github.com
2020-03-28T03:55:06.0730569Z > User-Agent: curl/7.58.0
2020-03-28T03:55:06.0731123Z > Authorization: token ***
2020-03-28T03:55:06.0731723Z > Content-Type: application/json
2020-03-28T03:55:06.0897869Z > Accept: application/vnd.github.everest-preview+json
2020-03-28T03:55:06.0898725Z > Content-Length: 142
2020-03-28T03:55:06.0900180Z > 
2020-03-28T03:55:06.0900539Z } [142 bytes data]
2020-03-28T03:55:06.0900883Z * upload completely sent off: 142 out of 142 bytes
2020-03-28T03:55:06.0901199Z { [5 bytes data]
2020-03-28T03:55:06.0901705Z * TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
2020-03-28T03:55:06.0902190Z { [1 bytes data]
2020-03-28T03:55:06.0902502Z * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
2020-03-28T03:55:06.0902996Z { [57 bytes data]
2020-03-28T03:55:06.0903315Z * TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
2020-03-28T03:55:06.0903634Z { [1 bytes data]
2020-03-28T03:55:06.0903951Z * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
2020-03-28T03:55:06.0904455Z { [57 bytes data]
2020-03-28T03:55:06.0904777Z * TLSv1.3 (IN), TLS Unknown, Unknown (23):
2020-03-28T03:55:06.0905627Z { [1 bytes data]
2020-03-28T03:55:06.0906392Z < HTTP/1.1 204 No Content
2020-03-28T03:55:06.0906723Z < Server: GitHub.com
2020-03-28T03:55:06.0907043Z < Date: Sat, 28 Mar 2020 03:55:05 GMT
2020-03-28T03:55:06.0907354Z < Status: 204 No Content
2020-03-28T03:55:06.0907932Z < X-RateLimit-Limit: 5000
2020-03-28T03:55:06.0908480Z < X-RateLimit-Remaining: 4978
2020-03-28T03:55:06.0909012Z < X-RateLimit-Reset: 1585370052
2020-03-28T03:55:06.0909526Z < X-OAuth-Scopes: repo
2020-03-28T03:55:06.0910045Z < X-Accepted-OAuth-Scopes: 
2020-03-28T03:55:06.0910612Z < X-GitHub-Media-Type: github.v3; param=everest-preview; format=json
2020-03-28T03:55:06.0911377Z < Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset
2020-03-28T03:55:06.0911970Z < Access-Control-Allow-Origin: *
2020-03-28T03:55:06.0912557Z < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
2020-03-28T03:55:06.0913463Z < X-Frame-Options: deny
2020-03-28T03:55:06.0914167Z < X-Content-Type-Options: nosniff
2020-03-28T03:55:06.0914709Z < X-XSS-Protection: 1; mode=block
2020-03-28T03:55:06.0915479Z < Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
2020-03-28T03:55:06.0916283Z < Content-Security-Policy: default-src 'none'
2020-03-28T03:55:06.0917004Z < Vary: Accept-Encoding, Accept, X-Requested-With
2020-03-28T03:55:06.0917576Z < X-GitHub-Request-Id: 0400:0AFD:6FB79:160964:5E7ECA99
2020-03-28T03:55:06.0917938Z < 
2020-03-28T03:55:06.0918169Z 
2020-03-28T03:55:06.0918883Z 100   142    0     0  100   142      0    793 --:--:-- --:--:-- --:--:--   793
2020-03-28T03:55:06.0919274Z * Connection #0 to host api.github.com left intact
2020-03-28T03:55:06.0950560Z Cleaning up orphan processes

Delete artifact api request sometimes fails - add retry?

I am getting this error when using this

Run christian-korneck/delete-run-artifacts-action@v1
with:
parent_runid: 261405865
parent_repo: pankajbokdia/repoName
env:
GITHUB_TOKEN: ***
[@octokit/rest] const Octokit = require("@octokit/rest") is deprecated. Use const { Octokit } = require("@octokit/rest") instead
[@octokit/rest] const Octokit = require("@octokit/rest") is deprecated. Use const { Octokit } = require("@octokit/rest") instead
artifacts before deletion: 1
processing artifact: build 18063905
status: 204
artifacts after deletion: 1
##[error]🛑 not all artifacts deleted (1 remaining)

Please help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.