Skip to content

Commit

Permalink
Github action octokit
Browse files Browse the repository at this point in the history
  • Loading branch information
NeftaliYagua committed Jan 31, 2024
1 parent 8ae28e2 commit 2f49aa7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 25 deletions.
5 changes: 2 additions & 3 deletions .github/actions/get-members.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ octokit.request('GET /orgs/{org}/members', {
}).then(( data )=>{
doc.contents = data;
let result = doc.toString();
console.log(result);
fs.writeFile('test.txt', result, err => {
fs.writeFile('./public/members.yml', result, err => {
if (err) {
console.error(err);
} else {
// file written successfully
console.log(result);
}
});
});
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/npm-gulp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ jobs:
node_modules/.bin/gulp bundle
node_modules/.bin/gulp preview:build
cp build/ui-bundle.zip ./public/
- run: npm install @octokit/action
- run: npm install yaml
# Node.js script can be anywhere. A good convention is to put local GitHub Actions
# into the `.github/actions` folder
- run: node .github/actions/get-members.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/request-members.yml

This file was deleted.

0 comments on commit 2f49aa7

Please sign in to comment.