Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
omf-packages-main
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
omf-packages-main
Commits
fe568b59
Commit
fe568b59
authored
Jul 03, 2022
by
Pablo Santiago Blum de Aguiar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workflows: Check dead repos on PRs
parent
be04327a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
6 deletions
+48
-6
.github/workflows/check-dead-repos.yml
.github/workflows/check-dead-repos.yml
+35
-6
.github/workflows/pull-request-artifacts.yml
.github/workflows/pull-request-artifacts.yml
+13
-0
No files found.
.github/workflows/check-dead-repos.yml
View file @
fe568b59
name
:
Check for dead repositories
on
:
push
:
pull_request
:
schedule
:
-
cron
:
'
30
5,17
*
*
*'
workflow_run
:
workflows
:
[
Pull Request Artifacts
]
types
:
-
completed
jobs
:
check-dead-repos
:
runs-on
:
ubuntu-latest
env
:
HOME
:
/home/nemo
USERNAME
:
${{ secrets.USERNAME }}
TOKEN
:
${{ secrets.TOKEN }}
container
:
ohmyfish/ohmyfish
steps
:
-
name
:
Change current working directory owner and group
run
:
sudo chown -R nemo:nemo .
-
uses
:
actions/checkout@v3
with
:
set-safe-directory
:
false
-
name
:
Install dependencies
run
:
sudo apk add python3
run
:
sudo apt update && sudo apt install -y fish python3
-
name
:
Download artifact
if
:
>
(github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success')
uses
:
actions/github-script@v6.1.0
with
:
script
:
|
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "packages"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{ github.workspace }}/packages.zip', Buffer.from(download.data));
-
name
:
Unzip packages
if
:
>
(github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success')
run
:
|
rm packages/*
unzip packages.zip -d./packages/
-
name
:
Check dead repositories
run
:
fish .github/workflows/check-dead-repos.fish
.github/workflows/pull-request-artifacts.yml
0 → 100644
View file @
fe568b59
name
:
Pull Request Artifacts
on
:
pull_request
:
jobs
:
pull-request-artifacts
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v3
-
name
:
Upload artifact
uses
:
actions/upload-artifact@v2
with
:
name
:
packages
path
:
packages/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment