diff --git a/.github/workflows/update-kubecon.yaml b/.github/workflows/update-kubecon.yaml new file mode 100644 index 00000000..317bdcf6 --- /dev/null +++ b/.github/workflows/update-kubecon.yaml @@ -0,0 +1,36 @@ +name: Update Kubecon.md +on: + schedule: + - cron: '0 */6 * * *' + workflow_dispatch: +jobs: + update-kubecon: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Pull html from site and convert to markdown + run: | + # go install github.com/suntong/html2md@latest + HTML2MD=html2md_1.5.0_linux_amd64 + wget https://github.com/suntong/html2md/releases/download/v1.5.0/${HTML2MD}.tar.gz + tar xvf ${HTML2MD}.tar.gz + + wget https://sites.google.com/view/flux-kubecon-paris-2024/home -O kubecon.html \ + && ./${HTML2MD}/html2md -i kubecon.html |sed '1,6d'|head -n -13 \ + > KUBECON.md \ + && rm kubecon.html && rm -rf ${HTML2MD}* + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + commit-message: Update KUBECON.md + title: Update from source URL + body: | + - Detected changes from https://sites.google.com/view/flux-kubecon-paris-2024/home + + Auto-generated by [create-pull-request][1] + + [1]: https://github.com/peter-evans/create-pull-request + branch: update-kubecon