Skip to content

Commit

Permalink
chore: fixed prettier in worker-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Dec 17, 2024
1 parent 35ed7e0 commit 26a8d2b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/worker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,22 @@ jobs:
const path = require('path');
const github = require('@actions/github');
const manifestPath = path.relative('.', 'manifest.json');
async function pushChanges() {
const octokit = github.getOctokit(process.env.GITHUB_TOKEN);
const context = github.context;
const owner = context.repo.owner;
const repo = context.repo.repo;
const ref = 'heads/${{ github.ref_name }}';
try {
const currentCommit = await octokit.rest.git.getRef({
owner,
repo,
ref
});
console.log('Adding file:', manifestPath);
const treeEntries = [
{
Expand All @@ -128,30 +128,30 @@ jobs:
base_tree: currentCommit.data.object.sha,
tree: treeEntries,
});
const newCommit = await octokit.rest.git.createCommit({
owner,
repo,
message: 'chore: updated manifest.json worker URL',
tree: newTree.data.sha,
parents: [currentCommit.data.object.sha]
});
await octokit.rest.git.updateRef({
owner,
repo,
ref,
sha: newCommit.data.sha,
force: true
});
console.log('Changes pushed successfully');
} catch (error) {
console.error('Error pushing changes:', error);
process.exit(1);
}
}
pushChanges();
"
else
Expand Down

0 comments on commit 26a8d2b

Please sign in to comment.