Skip to content

Commit f5928a6

Browse files
committed
Host index source file in repository
The index source file contains the normalized URL and the metadata that can't be derived from the library releases ("types" data and locked name) for each of the libraries in the Library Manager index. It's most appropriate to store it in the same repository as the submission list.
1 parent 1cdeda2 commit f5928a6

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.github/workflows/manage-prs.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -287,19 +287,20 @@ jobs:
287287
repo: ${{ github.event.repository.name }}
288288
pull_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }}
289289

290-
- name: Set environment variables
291-
run: |
292-
echo "INDEX_ENTRY_FILE_PATH=${{ runner.temp }}/index-entry.txt" >> "$GITHUB_ENV"
290+
- name: Checkout index source branch
291+
uses: actions/checkout@v2
292+
with:
293+
ref: production
293294

294-
- name: Write index entry to file
295+
- name: Add index source file entry for submissions
295296
run: |
296-
echo "${{ needs.parse.outputs.index-entry }}" >> "${{ env.INDEX_ENTRY_FILE_PATH }}"
297-
298-
- name: Upload index entry file to workflow artifact
299-
uses: actions/upload-artifact@v2
300-
with:
301-
path: ${{ env.INDEX_ENTRY_FILE_PATH }}
302-
name: index-entry
297+
INDEX_SOURCE_FILE_PATH="${{ github.workspace }}/repositories.txt"
298+
git config --global user.email "bot@arduino.cc"
299+
git config --global user.name "ArduinoBot"
300+
echo "${{ needs.parse.outputs.index-entry }}" >> "$INDEX_SOURCE_FILE_PATH"
301+
git add --update "$INDEX_SOURCE_FILE_PATH"
302+
echo -e "Add submission # ${{ github.event.pull_request.number }}${{ github.event.issue.number }}\n\n${{ github.event.repository.html_url }}/pull/${{ github.event.pull_request.number }}${{ github.event.issue.number }}" | git commit --file -
303+
git push
303304
304305
request-review:
305306
needs:

0 commit comments

Comments
 (0)