Skip to content

Commit

Permalink
fix: bump all libraries versions and fix project context
Browse files Browse the repository at this point in the history
  • Loading branch information
jgazeau committed Jun 5, 2024
1 parent cd04418 commit 95814f1
Show file tree
Hide file tree
Showing 174 changed files with 1,210 additions and 718 deletions.
434 changes: 265 additions & 169 deletions .bmycconfig.json

Large diffs are not rendered by default.

37 changes: 8 additions & 29 deletions .github/workflows/branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ on:
paths:
- '**'
env:
HUGO_BASIC_EXAMPLE_REPO: 'gohugoio/hugoBasicExample'
HUGO_BIN_NAME: 'hugo'
HUGO_CACHE_NAME: 'hugo-bin-cache'
HUGO_BIN_PATH: ci_hugo_bin
HUGO_VERSION_THRESHOLD: '0.103.0'
HTMLTEST_BIN_NAME: htmltest
HTMLTEST_CACHE_NAME: 'htmltest-bin-cache'
HTMLTEST_BIN_PATH: ci_htmltest_bin
Expand All @@ -25,7 +23,7 @@ env:
jobs:
hugo-binaries:
name: Manage Hugo binaries
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: Manage Hugo cache key
run: echo ${HUGO_TESTS_VERSIONS} > ${HUGO_CACHE_NAME}
Expand All @@ -47,11 +45,7 @@ jobs:
printf "%70s\n" | tr ' ' '-'
printf "%-60s%10s\n" "-> Downloading Hugo version:" "${hugoVersion}"
printf "%70s\n" | tr ' ' '-'
if [ "${HUGO_VERSION_THRESHOLD}" = "$(printf "%s\n%s" "${HUGO_VERSION_THRESHOLD}" "${hugoVersion}" | sort -V | head -n1)" ]; then
HUGO_BIN="hugo_extended_${hugoVersion}_darwin-universal.tar.gz"
else
HUGO_BIN="hugo_extended_${hugoVersion}_macOS-64bit.tar.gz"
fi
HUGO_BIN="hugo_extended_${hugoVersion}_linux-amd64.tar.gz"
HUGO_URL_BIN="https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/${HUGO_BIN}"
(cd ${ABS_HUGO_BIN_PATH} && curl -sLO -H "Accept: application/octet-stream" ${HUGO_URL_BIN})
tar -xf ${ABS_HUGO_BIN_PATH}/${HUGO_BIN} -C ${ABS_HUGO_BIN_PATH}
Expand All @@ -66,19 +60,13 @@ jobs:
test-theme-hugo:
needs: hugo-binaries
name: Test theme against Hugo versions
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout theme repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- name: Checkout hugoBasicExample repository
uses: actions/checkout@v4
with:
repository: ${{ env.HUGO_BASIC_EXAMPLE_REPO }}
path: ${{ env.HUGO_BASIC_EXAMPLE_REPO }}
fetch-depth: 1
- name: Manage Hugo cache key
run: echo ${HUGO_TESTS_VERSIONS} > ${HUGO_CACHE_NAME}
- name: Cache Hugo binaries
Expand All @@ -97,19 +85,10 @@ jobs:
${HUGO_BIN_NAME}_${hugoVersion} version
${HUGO_BIN_NAME}_${hugoVersion} -s exampleSite
done
- name: Check theme against hugoBasicExample and Hugo versions
run: |
for hugoVersion in ${HUGO_TESTS_VERSIONS[@]}; do
printf "%70s\n" | tr ' ' '-'
printf "%-70s\n" "-> Checking theme against hugoBasicExample"
printf "%70s\n" | tr ' ' '-'
${HUGO_BIN_NAME}_${hugoVersion} version
${HUGO_BIN_NAME}_${hugoVersion} -s ${HUGO_BASIC_EXAMPLE_REPO} -t ../../../
done
test-theme-links:
needs: hugo-binaries
name: Test theme links
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout theme repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -142,7 +121,7 @@ jobs:
printf "%70s\n" | tr ' ' '-'
printf "%-60s%10s\n" "-> Downloading Htmltest"
printf "%70s\n" | tr ' ' '-'
HTMLTEST_URL_BIN=$(curl -XGET -H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -s https://api.github.com/repos/wjdp/htmltest/releases/latest | jq -r '.assets[]|select(.name | test(".*_macos_amd64.tar.gz")).browser_download_url')
HTMLTEST_URL_BIN=$(curl -XGET -H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -s https://api.github.com/repos/wjdp/htmltest/releases/latest | jq -r '.assets[]|select(.name | test(".*_linux_i386.tar.gz")).browser_download_url')
HTMLTEST_BIN=${HTMLTEST_URL_BIN##*/}
(cd ${ABS_HTMLTEST_BIN_PATH} && curl -sLO -H "Accept: application/octet-stream" ${HTMLTEST_URL_BIN})
tar -xf ${ABS_HTMLTEST_BIN_PATH}/${HTMLTEST_BIN} -C ${ABS_HTMLTEST_BIN_PATH}
Expand All @@ -161,7 +140,7 @@ jobs:
test-theme-chrome:
needs: hugo-binaries
name: Test theme against Chrome
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout theme repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -209,7 +188,7 @@ jobs:
test-theme-firefox:
needs: hugo-binaries
name: Test theme against Firefox
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout theme repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -257,7 +236,7 @@ jobs:
test-theme-edge:
needs: hugo-binaries
name: Test theme against Edge
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- name: Checkout theme repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bumpBmyc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ jobs:
git config --local user.email "action@github.com"
git commit -m "${PR_TITLE}"
git push -f origin ${BRANCH_NAME}
hub pull-request -f --file ${LOG_FILE} -l "internal" --base main --head ${BRANCH_NAME}
gh pr create --title "$(head -n 1 ${LOG_FILE})" --body "$(tail -n +2 ${LOG_FILE})" --label "internal" --base main --head ${BRANCH_NAME} --fill
fi
4 changes: 1 addition & 3 deletions .github/workflows/bumpHugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
token: ${{ secrets.WORKFLOW_GITHUB_TOKEN }}
- name: Bump thirdparties and create PR
env:
LOG_FILE: 'workflow.log'
PR_TITLE: 'build: bump Hugo'
BRANCH_NAME: 'build/bump_hugo'
GITHUB_TOKEN: ${{ secrets.WORKFLOW_GITHUB_TOKEN }}
Expand All @@ -36,12 +35,11 @@ jobs:
sed -i 's/HUGO_TESTS_VERSIONS:.*/HUGO_TESTS_VERSIONS: '\'"${minHugoVersion}"' '"${latestHugoVersion}"\''/' .github/workflows/branches.yml
sed -i 's/HUGO_VERSION.*/HUGO_VERSION = "'"${latestHugoVersion}"'"/' netlify.toml
if [[ $(git status --porcelain | wc -l) -gt 0 ]];then
printf "%s\n" "chore:(bmyc): bump latest hugo version to ${latestHugoVersion}" > ${LOG_FILE}
git checkout -b ${BRANCH_NAME}
git add -u .
git config --local user.name "GitHub Action"
git config --local user.email "action@github.com"
git commit -m "${PR_TITLE}"
git push -f origin ${BRANCH_NAME}
hub pull-request -f --file ${LOG_FILE} -l "internal" --base main --head ${BRANCH_NAME}
gh pr create --title "chore:(bmyc): bump latest hugo version to ${latestHugoVersion}" --label "internal" --base main --head ${BRANCH_NAME} --fill
fi
21 changes: 21 additions & 0 deletions .github/workflows/dependabot_auto_approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Dependabot auto-approve
on: pull_request

permissions:
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
23 changes: 23 additions & 0 deletions .github/workflows/dependabot_auto_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Dependabot auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Enable auto-merge for Dependabot PRs
if: contains(steps.metadata.outputs.dependency-names, 'my-dependency') && steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
2 changes: 1 addition & 1 deletion assets/css/external/asyncapi/default.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 95814f1

Please sign in to comment.