Skip to content

Commit

Permalink
fix: ci release
Browse files Browse the repository at this point in the history
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
  • Loading branch information
neilime committed Mar 31, 2024
1 parent be471a0 commit 35a0d85
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 81 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/release-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,17 @@ jobs:
with:
value: ${{ matrix.action }}

- run: |
- id: prepare-readme-generator
run: |
jq '.paths.action = "${{ matrix.action }}/action.yml"' .ghadocs.json > .ghadocs.json.tmp
mv .ghadocs.json.tmp .ghadocs.json
jq '.paths.readme = "${{ matrix.action }}/README.md"' .ghadocs.json > .ghadocs.json.tmp
mv .ghadocs.json.tmp .ghadocs.json
WORKSPACE_PATH=$(echo "${{ github.workspace }}" | sed 's/\/\([^/]\+\)/*\1/')
echo "readme-file=${WORKSPACE_PATH}/${{ matrix.action }}/README.md" >> "$GITHUB_OUTPUT"
- name: 📖 Generate README
uses: bitflight-devops/github-action-readme-generator@v1.8.0
with:
Expand All @@ -173,7 +177,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: changed-files-${{ steps.action-slug.outputs.result }}
path: ${{ github.workspace }}*/${{ matrix.action }}/README.md
path: ${{ steps.prepare-readme-generator.outputs.readme-file }}

generate-workflows-readme:
needs: prepare-release
Expand Down Expand Up @@ -213,7 +217,10 @@ jobs:
WORKFLOW_FILE="${{ matrix.workflow }}"
README_FILE="${WORKFLOW_FILE%.*}.md"

echo "readme-file=${README_FILE}" >> "$GITHUB_OUTPUT"
WORKSPACE_PATH=$(echo "${{ github.workspace }}" | sed 's/\/\([^/]\+\)/*\1/')
echo "readme-file=${WORKSPACE_PATH}/${README_FILE}" >> "$GITHUB_OUTPUT"

`${{ github.workspace }}`.replace(/\/([^/]+)/, '/*$1');

WORKFLOW_FULL_PATH="${{ github.repository }}/${WORKFLOW_FILE}"

Expand All @@ -222,7 +229,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: changed-files-${{ steps.workflow-slug.outputs.result }}
path: ${{ github.workspace }}*/${{ steps.generate-readme.outputs.readme-file }}
path: ${{ steps.generate-readme.outputs.readme-file }}

publish-actions-readme:
needs: [prepare-release, generate-actions-readme, generate-workflows-readme]
Expand All @@ -241,6 +248,7 @@ jobs:
with:
pattern: changed-files-*
merge-multiple: true
path: /

- uses: actions/create-github-app-token@v1
if: inputs.github-app-id
Expand Down
77 changes: 0 additions & 77 deletions ci-github-common/.github/workflows/release-actions.md

This file was deleted.

0 comments on commit 35a0d85

Please sign in to comment.