repomd #1156
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
name: repomd | |
on: | |
push: | |
branches: main | |
workflow_dispatch: | |
schedule: | |
- cron: '25 0,6,12,18 * * *' | |
jobs: | |
repomd: | |
runs-on: ubuntu-latest | |
steps: | |
- id: checkout | |
uses: actions/checkout@v3 | |
- id: buildmd | |
run: | | |
bash createrepo.sh | |
- id: lpublish | |
name: "Publish metadata on GitHub" | |
run: | | |
git config user.name nethbot | |
git config user.email [email protected] | |
BRANCH=$(basename ${{ github.ref }}) | |
COMMIT_MESSAGE="repomd@$BRANCH" | |
REMOTE_BRANCH="repomd" | |
mkdir -vp .dst/ns8/updates/ | |
mv -v repodata.json .dst/ns8/updates | |
cp -av $(ls -d */) .dst/ns8/updates/ | |
cp -v README.md .dst/index.md | |
echo forge.genius.ke > .dst/CNAME | |
git add .dst/ | |
TREE=$(git write-tree --prefix=.dst) | |
COMMIT=$(git commit-tree -m "${COMMIT_MESSAGE}" ${TREE}) | |
git push -f origin $COMMIT:refs/heads/${REMOTE_BRANCH} | |
{ | |
echo "Repository metadata has been published to" | |
echo "" | |
echo "https://raw.githubusercontent.com/${{ github.repository }}/${REMOTE_BRANCH}/repodata.json" | |
echo "" | |
echo "Source" | |
echo "" | |
echo "https://github.com/${{ github.repository }}/tree/${REMOTE_BRANCH}" | |
echo "" | |
} >> $GITHUB_STEP_SUMMARY |