{"id":16123689,"url":"https://github.com/austenstone/markdown-interpolation-action","last_synced_at":"2025-03-18T12:31:30.603Z","repository":{"id":37210184,"uuid":"468534605","full_name":"austenstone/markdown-interpolation-action","owner":"austenstone","description":"An action for text interpolation that lets you incorporate dynamic string values into your markdown files.","archived":false,"fork":false,"pushed_at":"2023-10-19T13:37:23.000Z","size":14778,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T09:20:53.656Z","etag":null,"topics":["actions","interpolation","markdown"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/austenstone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["austenstone"]}},"created_at":"2022-03-10T22:49:28.000Z","updated_at":"2024-01-12T18:28:08.000Z","dependencies_parsed_at":"2024-10-27T18:15:14.510Z","dependency_job_id":"44bca5a6-9b82-4061-af79-182ac184467f","html_url":"https://github.com/austenstone/markdown-interpolation-action","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"austenstone/action-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austenstone%2Fmarkdown-interpolation-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austenstone%2Fmarkdown-interpolation-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austenstone%2Fmarkdown-interpolation-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austenstone%2Fmarkdown-interpolation-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austenstone","download_url":"https://codeload.github.com/austenstone/markdown-interpolation-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926063,"owners_count":20369911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","interpolation","markdown"],"created_at":"2024-10-09T21:18:17.702Z","updated_at":"2025-03-18T12:31:30.224Z","avatar_url":"https://github.com/austenstone.png","language":"TypeScript","funding_links":["https://github.com/sponsors/austenstone"],"categories":[],"sub_categories":[],"readme":"# Markdown Interpolation Action\n\nThis action interpolates markdown with variables.\n\nSee [Markdown Interpolation](https://github.com/austenstone/markdown-interpolation#writing) to understand how to use the interpolation syntax.\n\n## EXAMPLE 1\nCreate a workflow (eg: `.github/workflows/run.yml`). See [Creating a Workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file).\n\n### [Example 1 Workflow](.github/workflows/example1.yml)\n\n\u003c!--EXAMPLE1--\u003e\n```yml\nname: Example 1\non:\n  schedule:\n    - cron: \"* * * * *\"\njobs:\n  write-time:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: actions/github-script@v6\n        id: values\n        with:\n          script: |\n            return {\n              TIME: new Date().toLocaleString('en-US', { timeZone: 'America/New_York', timeZoneName: 'short' }),\n            };\n      - uses: austenstone/markdown-interpolation-action@main\n        with:\n          values: ${{ steps.values.outputs.result }}\n      - uses: stefanzweifel/git-auto-commit-action@v4\n        with:\n          commit_author: github-actions[bot] \u003cgithub-actions[bot]@users.noreply.github.com\u003e\n\n```\n\u003c!--END EXAMPLE1--\u003e\n\n### Example 1 README\n```md\n##### Last Updated: \u003c!--TIME--\u003e10/5/2023, 8:38:17 PM (EST)\u003c!--END TIME--\u003e\n```\n\n### Example 1 Result (LIVE)\n##### Last Updated: \u003c!--TIME--\u003e10/5/2023, 8:38:17 PM (EST)\u003c!--END TIME--\u003e\n\n## EXAMPLE 2\n\nAn example to manually update a message on the README.md file.\n\n### [Example 2 Workflow](.github/workflows/example2.yml)\n\u003c!--EXAMPLE2--\u003e\n```yml\nname: Example 2\non:\n  workflow_dispatch:\n    inputs:\n      message:\n        description: \"A message to show in the README.md file\"\n        required: true\n        default: \"Hello World!\"\n\njobs:\n  write-message:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: actions/github-script@v6\n        id: values\n        env:\n          MESSAGE: ${{ github.event.inputs.message }}\n          AUTHOR: ${{ github.actor }}\n        with:\n          script: |\n            return {\n              MESSAGE: process.env.MESSAGE,\n              AUTHOR: process.env.AUTHOR,\n            };\n      - uses: austenstone/markdown-interpolation-action@main\n        with:\n          values: ${{ steps.values.outputs.result }}\n      - uses: stefanzweifel/git-auto-commit-action@v4\n        with:\n          commit_author: github-actions[bot] \u003cgithub-actions[bot]@users.noreply.github.com\u003e\n\n```\n\u003c!--END EXAMPLE2--\u003e\n\n### Example 2 README\n```md\n@\u003c!--AUTHOR--\u003eaustenstone\u003c!--END AUTHOR--\u003e says \u003c!--MESSAGE--\u003eHello World!\u003c!--END MESSAGE--\u003e\n```\n\n### Example 2 Result (LIVE)\n@\u003c!--AUTHOR--\u003eaustenstone\u003c!--END AUTHOR--\u003e says \u003c!--MESSAGE--\u003eHello World!\u003c!--END MESSAGE--\u003e\n\n## EXAMPLE 3\n\nThis example is actually upating the README.md examples themselves 🤯\nThese example `yml` scripts in the README are generated automatically when the files change.\n\n### [Example 3 Workflow](.github/workflows/example3.yml)\n\u003c!--EXAMPLE3--\u003e\n```yml\nname: Example 3\non:\n  push:\n    branches:\n      - \"main\"\n    paths:\n      - \".github/workflows/**.yml\"\n\njobs:\n  write-examples:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: actions/github-script@v6\n        id: values\n        with:\n          script: |\n            const fs = require('fs');\n            const examples = ['example1', 'example2', 'example3', 'example4'];\n            const exampleContent = {};\n            examples.forEach((example) =\u003e {\n              let content = fs.readFileSync(`.github/workflows/${example}.yml`).toString();\n              content = content.replace('uses: austenstone/markdown-interpolation-action@main', 'uses: austenstone/markdown-interpolation-action@main');\n              content = content.replace(/.*- uses: actions\\/checkout@v[0-9]+\\n/g, '')\n              exampleContent[example.toUpperCase()] = '\\n```yml\\n' + content + '\\n```\\n';\n            });\n            return exampleContent;\n      - uses: ./\n        with:\n          values: ${{ steps.values.outputs.result }}\n      - uses: stefanzweifel/git-auto-commit-action@v4\n        with:\n          commit_author: github-actions[bot] \u003cgithub-actions[bot]@users.noreply.github.com\u003e\n\n```\n\u003c!--END EXAMPLE3--\u003e\n\n### Example 3 Result (LIVE)\nyaml code snippets [Example 1](#example-1-workflow), [Example 2](#example-2-workflow), [Example 3](#example-3-workflow), [Example 4](#example-4-workflow).\n\n## EXAMPLE 4\n\nExamine the event context of the last run.\n⚠️ This is just an example and shouldn't be used on a public repository.\n\n### [Example 4 Workflow](.github/workflows/example4.yml)\n\u003c!--EXAMPLE4--\u003e\n```yml\nname: Example 4\non:\n  issues:\n    types:\n      - opened\n      - edited\n\njobs:\n  write-last-issue:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: actions/github-script@v6\n        id: values\n        with:\n          script: |\n            return {\n              TITLE: context.payload.issue.title,\n              BODY: context.payload.issue.body,\n              NUMBER: '#' + context.payload.issue.number,\n            };\n      - uses: austenstone/markdown-interpolation-action@main\n        with:\n          values: ${{ steps.values.outputs.result }}\n      - uses: stefanzweifel/git-auto-commit-action@v4\n        with:\n          commit_author: github-actions[bot] \u003cgithub-actions[bot]@users.noreply.github.com\u003e\n\n```\n\u003c!--END EXAMPLE4--\u003e\n\n### Example 4 Result (LIVE)\n#### \u003c!--TITLE--\u003eExample 4 Test\u003c!--END TITLE--\u003e \u003c!--NUMBER--\u003e#1\u003c!--END NUMBER--\u003e\n\u003c!--BODY--\u003eThis is a test for Example 4.\u003c!--END BODY--\u003e\n\n## Inputs\n\n| Name | Description | Default |\n| --- | - | - |\n| **values** | JSON values to interpolate in markdown. | N/A |\n| files-regex | File name match as regex. | README.md |\n| files-regex-flags | Regex flags for files-regex. | gi |\n\n## Outputs\n\n| Name | Description | Default |\n| --- | - | - |\n| **values** | JSON values read. (last values) | {} |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustenstone%2Fmarkdown-interpolation-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustenstone%2Fmarkdown-interpolation-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustenstone%2Fmarkdown-interpolation-action/lists"}