feat: Add new workflow for generating modpack readme #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/generate-readme.yml | |
on: | |
workflow_call: | |
jobs: | |
generate-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: tibdex/github-app-token@v1 | |
id: get_installation_token | |
with: | |
app_id: ${{ vars.CI_APP_ID }} | |
private_key: ${{ secrets.CI_TOKEN }} | |
- uses: actions/checkout@v4 | |
with: | |
repository: "beeheim/actions-workflows" | |
path: cicd | |
ref: ${{ (github.ref_name == inputs.test-branch-name) && inputs.test-branch-name || 'main' }} | |
token: ${{ steps.get_installation_token.outputs.token }} | |
- name: install dependencies | |
run: | | |
cd cicd/scripts | |
npm install fs | |
- name: Generate README | |
id: generate-readme | |
uses: cicd/scripts/generate-readme | |
with: | |
modpack-path: "modpack" | |
- name: Copy README to root | |
run: cp modpack/README.md . | |
# - name: Use output from your action | |
# run: echo "Output from your action: ${{ steps.your-action.outputs.output1 }}" |