Skip to content

Commit

Permalink
v5
Browse files Browse the repository at this point in the history
  • Loading branch information
tommerty committed Jan 5, 2025
1 parent c8b88db commit bfc1869
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ env:
jobs:
update-readme:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Generate Doras Links
uses: dorasto/[email protected].4
uses: dorasto/[email protected].5
with:
username: ${{ env.DORAS_USERNAME }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "doras-action",
"version": "1.0.3",
"version": "1.0.5",
"main": "src/index.ts",
"scripts": {
"build": "tsc",
Expand Down
17 changes: 17 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as core from "@actions/core";
import * as exec from "@actions/exec";
import axios from "axios";
import * as fs from "fs";

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

core.setOutput("markdown", markdown);
await exec.exec("git", [
"config",
"--local",
"user.email",
"[email protected]",
]);
await exec.exec("git", [
"config",
"--local",
"user.name",
"GitHub Action",
]);
await exec.exec("git", ["add", "README.md"]);
await exec.exec("git", ["commit", "-m", "Update Doras links"]);
await exec.exec("git", ["push"]);
core.info("Changes committed and pushed");
} catch (error) {
if (error instanceof Error) {
core.setFailed(error.message);
Expand Down

0 comments on commit bfc1869

Please sign in to comment.