Skip to content

Commit

Permalink
Add "Update Kubecon.md" workflow
Browse files Browse the repository at this point in the history
* fixup: kingdonb
* add contents: write, pull-requests: write

do not pass GITHUB_TOKEN explicitly (it is the default value)

* permissions: contents, pull-requests
* don't try building go inline in the action

there is a release binary we can download and use, it's faster

Signed-off-by: Kingdon P Barrett <[email protected]>
  • Loading branch information
kingdonb committed Feb 22, 2024
1 parent 7d688dc commit 839f9f9
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/update-kubecon.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 839f9f9

Please sign in to comment.