Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shysolocup authored Oct 2, 2024
1 parent f1814a8 commit 273a585
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/logref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: update logref

on:
push:
branches: [main]
branches: [v1, v2]
paths:
- Logs/**
- .github/workflows/logs/**
Expand Down Expand Up @@ -35,4 +35,4 @@ jobs:
git config --global user.email ${{ github.event.pusher.email }}
- name: Run the scripts
run: node ./logref.js --username=${{ github.actor }} --useremail=${{ github.event.pusher.email }} --commitmsg=${{ github.event.head_commit.message }}
run: node ./logref.js --username=${{ github.actor }} --useremail=${{ github.event.pusher.email }} --branch=${{ github.ref_name }} --commitmsg=${{ github.event.head_commit.message }}
8 changes: 5 additions & 3 deletions .github/workflows/logs/scripts/logref.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ const args = getArgs();
const username = args.username;
const useremail = args.useremail;
const commitmsg = args.commitmsg;
const branch = args.branch;

console.log(username);
console.log(useremail);
console.log(commitmsg);
console.log(branch);

/*fetch(`https://api.github.com/user/${username}`, {
"headers": {
Expand All @@ -47,8 +49,8 @@ console.log('test');

let base = "https://github.com/ReRand/RENTED";

let tree = `${base}/tree/main/Logs`;
let blob = `${base}/blob/main/Logs`
let tree = `${base}/tree/${branch}/Logs`;
let blob = `${base}/blob/${branch}/Logs`

let sep = (__dirname.includes("/")) ? "/" : "\\";

Expand All @@ -64,7 +66,7 @@ let content = [
"",
"# LogRef",
"this is where log references are for easier navigation<br>",
'<img height=22 src="https://github.com/ReRand/RENTED/actions/workflows/logref.yml/badge.svg" alt="publish">',
`<img height=22 src="${base}/actions/workflows/logref.yml/badge.svg alt="publish">`,
"",
"---",
"",
Expand Down

0 comments on commit 273a585

Please sign in to comment.