Skip to content

Commit

Permalink
Update github worflows cron scheduling + use bash-compiler DEFAULT_TE…
Browse files Browse the repository at this point in the history
…MPLATE_FOLDER
  • Loading branch information
fchastanet committed Dec 28, 2024
1 parent 17f4e6c commit e33d104
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .bash-compiler
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FRAMEWORK_ROOT_DIR=${ROOT_DIR}
TEMPLATES_ROOT_DIR=${HOME}/fchastanet/bash-compiler/examples/templates
TEMPLATES_ROOT_DIR=${DEFAULT_TEMPLATE_FOLDER}
2 changes: 2 additions & 0 deletions .cspell/softwares.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ pcmanfm
phpmd
phpstorm
Phpstorm
pipx
pixbuf
plantuml
Plantuml
Expand Down Expand Up @@ -167,3 +168,4 @@ xsession
Xsrv
xvfb
Xvfb
yapf
6 changes: 4 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
# Check for updates to GitHub Actions every month
interval: "monthly"
day: "friday"
time: "22:00"
timezone: "Europe/Paris"
open-pull-requests-limit: 1
24 changes: 12 additions & 12 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
build-bash-docker-images:
runs-on: ubuntu-22.04
permissions:
# needed by akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
# needed by ouzi-dev/commit-status-updater@v2
statuses: write
strategy:
fail-fast: true
Expand All @@ -67,7 +67,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

# overall process
- uses: akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
- uses: ouzi-dev/commit-status-updater@v2
with:
name: build-bash-tools
status: pending
Expand All @@ -87,7 +87,7 @@ jobs:
echo "bashImage=amd64/bash:${{ matrix.bashTarVersion }}-alpine3.19"
fi
) >> "${GITHUB_ENV}"
- uses: akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
- uses: ouzi-dev/commit-status-updater@v2
with:
name: build-${{ env.image_tag }}
status: pending
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-to: type=gha,mode=max,scope=${{ env.image_tag }}

- uses: akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
- uses: ouzi-dev/commit-status-updater@v2
with:
name: build-${{ env.image_tag }}
status: ${{ job.status }}
Expand All @@ -154,7 +154,7 @@ jobs:
runs-on: ubuntu-22.04
needs: [build-bash-docker-images]
permissions:
# needed by akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
# needed by ouzi-dev/commit-status-updater@v2
statuses: write
steps:
- name: Checkout
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- uses: akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
- uses: ouzi-dev/commit-status-updater@v2
with:
name: pre-commit-megalinter
status: pending
Expand Down Expand Up @@ -291,7 +291,7 @@ jobs:
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- uses: akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
- uses: ouzi-dev/commit-status-updater@v2
if: ${{ always() }}
with:
name: pre-commit-megalinter
Expand All @@ -305,7 +305,7 @@ jobs:
runs-on: ubuntu-22.04
needs: [build-bash-docker-images]
permissions:
# needed by akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
# needed by ouzi-dev/commit-status-updater@v2
statuses: write
# needed by mikepenz/action-junit-report@v4
checks: write
Expand Down Expand Up @@ -347,7 +347,7 @@ jobs:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- uses: akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
- uses: ouzi-dev/commit-status-updater@v2
with:
name: unit-tests-${{matrix.vendor}}-${{matrix.bashTarVersion}}
status: pending
Expand Down Expand Up @@ -419,7 +419,7 @@ jobs:
path: |
logs/**
- uses: akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
- uses: ouzi-dev/commit-status-updater@v2
with:
name: unit-tests-${{matrix.vendor}}-${{matrix.bashTarVersion}}
status: ${{ job.status }}
Expand All @@ -430,15 +430,15 @@ jobs:
needs: [unit-tests]
runs-on: ubuntu-22.04
permissions:
# needed by akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
# needed by ouzi-dev/commit-status-updater@v2
statuses: write

steps:
# run this action to get the workflow conclusion
# You can get the conclusion via env (env.WORKFLOW_CONCLUSION)
- uses: AbsoLouie/[email protected]

- uses: akatov/commit-status-updater@a9e988ec5454692ff7745a509452422a35172ad6
- uses: ouzi-dev/commit-status-updater@v2
with:
name: build-bash-tools
# neutral, success, skipped, cancelled, timed_out, action_required, failure
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/precommit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
# https://crontab.cronhub.io/
- cron: "30 10 * * *"
- cron: "30 22 1-7 */3 FRI"
jobs:
auto-update:
runs-on: ubuntu-22.04
Expand Down
16 changes: 13 additions & 3 deletions .pre-commit-config-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ default_stages: [pre-commit, manual]
minimum_pre_commit_version: 3.5.0
fail_fast: false
repos:
# enables pre-commit to install the hooks using pipx
- repo: https://github.com/pypa/pipx
rev: 1.7.1
hooks:
- id: pipx
alias: yapf
name: yapf
args: ["yapf", "-i"]
types: ["python"]

- repo: local
# this hook is not intended to be run on github
# it just allows to generate the same pre-commit
Expand All @@ -25,7 +35,7 @@ repos:

- repo: https://github.com/executablebooks/mdformat
# Do this before other tools "fixing" the line endings
rev: 0.7.19
rev: 0.7.21
hooks:
- id: mdformat
name: Format Markdown
Expand Down Expand Up @@ -150,7 +160,7 @@ repos:
)
- repo: https://github.com/fchastanet/bash-tools-framework
rev: 6.0.0
rev: 6.1.1
hooks:
- id: fixShebangExecutionBit
- id: awkLint
Expand Down Expand Up @@ -195,6 +205,6 @@ repos:
stages: [manual] # GITHUB

- repo: https://github.com/fchastanet/bash-compiler
rev: v3.1.0
rev: 3.1.2
hooks:
- id: buildBashBinaries
16 changes: 13 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ default_stages: [pre-commit, manual]
minimum_pre_commit_version: 3.5.0
fail_fast: true
repos:
# enables pre-commit to install the hooks using pipx
- repo: https://github.com/pypa/pipx
rev: 1.7.1
hooks:
- id: pipx
alias: yapf
name: yapf
args: ["yapf", "-i"]
types: ["python"]

- repo: local
# this hook is not intended to be run on github
# it just allows to generate the same pre-commit
Expand All @@ -20,7 +30,7 @@ repos:

- repo: https://github.com/executablebooks/mdformat
# Do this before other tools "fixing" the line endings
rev: 0.7.19
rev: 0.7.21
hooks:
- id: mdformat
name: Format Markdown
Expand Down Expand Up @@ -145,7 +155,7 @@ repos:
)
- repo: https://github.com/fchastanet/bash-tools-framework
rev: 6.0.0
rev: 6.1.1
hooks:
- id: fixShebangExecutionBit
- id: awkLint
Expand Down Expand Up @@ -190,6 +200,6 @@ repos:
stages: [] # GITHUB

- repo: https://github.com/fchastanet/bash-compiler
rev: v3.1.0
rev: 3.1.2
hooks:
- id: buildBashBinaries

0 comments on commit e33d104

Please sign in to comment.