Skip to content

Commit bfc1869

Browse files
committed
v5
1 parent c8b88db commit bfc1869

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

.github/workflows/example.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ env:
1111
jobs:
1212
update-readme:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1416
steps:
1517
- uses: actions/checkout@v4
1618

1719
- name: Generate Doras Links
18-
uses: dorasto/[email protected].4
20+
uses: dorasto/[email protected].5
1921
with:
2022
username: ${{ env.DORAS_USERNAME }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "doras-action",
3-
"version": "1.0.3",
3+
"version": "1.0.5",
44
"main": "src/index.ts",
55
"scripts": {
66
"build": "tsc",

src/index.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as core from "@actions/core";
2+
import * as exec from "@actions/exec";
23
import axios from "axios";
34
import * as fs from "fs";
45

@@ -51,6 +52,22 @@ async function run() {
5152
core.info("README.md updated successfully");
5253

5354
core.setOutput("markdown", markdown);
55+
await exec.exec("git", [
56+
"config",
57+
"--local",
58+
"user.email",
59+
60+
]);
61+
await exec.exec("git", [
62+
"config",
63+
"--local",
64+
"user.name",
65+
"GitHub Action",
66+
]);
67+
await exec.exec("git", ["add", "README.md"]);
68+
await exec.exec("git", ["commit", "-m", "Update Doras links"]);
69+
await exec.exec("git", ["push"]);
70+
core.info("Changes committed and pushed");
5471
} catch (error) {
5572
if (error instanceof Error) {
5673
core.setFailed(error.message);

0 commit comments

Comments
 (0)