Skip to content

Commit

Permalink
Replace dependabot for custom script
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed Jul 6, 2024
1 parent fbe486b commit 2aeae6f
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 52 deletions.
16 changes: 0 additions & 16 deletions .github/dependabot.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/diagram.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
pull-requests: write # for technote-space/create-pr-action to create a PR
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- name: Update diagram
uses: githubocto/[email protected]
uses: githubocto/repo-visualizer@a999615bdab757559bf94bda1fe6eef232765f85 # refs/tags/0.9.1
with:
excluded_paths: "ignore,.github"
output_file: codebase-structure.svg
should_push: false
- uses: technote-space/[email protected]
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # refs/tags/v2.1.4
with:
COMMIT_MESSAGE: 'Upgrade documentation diagram'
COMMIT_NAME: 'electrocucaracha bot'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
contents: write # for technote-space/create-pr-action to push code
pull-requests: write # for technote-space/create-pr-action to create a PR
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # refs/tags/v4.0.2
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('distros_supported.yml') }}
- name: Install vagrant tool
run: brew install vagrant
- uses: technote-space/[email protected]
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # refs/tags/v2.1.4
with:
EXECUTE_COMMANDS: |
./ci/update_distros.sh
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
name: Count Lines of Code
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- name: Setup Go
uses: actions/[email protected]
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # refs/tags/v5.0.1
with:
go-version: '>=1.20.0'
- name: Install dependencies
Expand All @@ -32,24 +32,24 @@ jobs:
name: Check documentation external links
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- name: Check broken links
uses: gaurav-nelson/github-action-markdown-link-check@1.0.15
uses: gaurav-nelson/github-action-markdown-link-check@499c1e7f3637c131334fa8e937c45144f79d72d2 # refs/tags/v1
check-super-linter:
name: Check syntax (super-linter)
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- name: Run super-linter validation
uses: github/super-linter@v5.0.0
uses: github/super-linter@4e51915f4a812abf59fed160bb14595c0a38a9e7 # refs/tags/v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: /
check-tox:
name: Check syntax (tox)
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- name: Install tox
run: pip install tox
- name: Run tox lint validation
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/on-demand_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
outputs:
scripts: ${{ steps.filter.outputs.scripts }}
steps:
- uses: actions/[email protected]
- uses: dorny/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # refs/tags/v3.0.2
if: ${{ !env.ACT }}
id: filter
with:
Expand All @@ -47,9 +47,9 @@ jobs:
needs: changes
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- name: Run the sh-checker
uses: luizm/[email protected]
uses: luizm/action-sh-checker@c6edb3de93e904488b413636d96c6a56e3ad671a # refs/tags/v0.8.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHFMT_OPTS: -i 4 -s
Expand All @@ -61,7 +61,7 @@ jobs:
needs: changes
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- name: Install ShellSpec
run: curl -fsSL https://github.com/shellspec/shellspec/releases/latest/download/shellspec-dist.tar.gz | tar -xz -C ..
- name: Run Shellspec
Expand All @@ -85,7 +85,7 @@ jobs:
- os: opensuse_leap
provider: virtualbox
steps:
- uses: actions/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- uses: ./.github/actions/vagrant-setup
with:
distro: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/[email protected]
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # refs/tags/1.8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/scheduled_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
check-ubuntu-bionic-baremetal:
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- name: Setup services
env:
PROVIDER: libvirt
Expand All @@ -37,7 +37,7 @@ jobs:
- os: centos_8
qat: false
steps:
- uses: actions/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- uses: ./.github/actions/vagrant-setup
with:
distro: ${{ matrix.os }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/spell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
name: Check spelling (reviewdog)
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: reviewdog/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- uses: reviewdog/action-misspell@a4e949a18ad1bfe75a5148c3e1230881feeb00da # refs/tags/v1.21.0
with:
github_token: ${{ secrets.github_token }}
check-spellcheck:
name: Check spelling (pyspelling)
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: igsekor/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- uses: igsekor/pyspelling-any@155eb06641bb9259cab59b5126a40be943ecb4f7 # refs/tags/v1.0.4
name: Spellcheck
14 changes: 5 additions & 9 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@ name: Scheduled Versions and Dictionary verification
# yamllint disable-line rule:truthy
on:
schedule:
- cron: '0 0 * * *'
- cron: '0 0 * * 5'
workflow_dispatch:

permissions:
contents: write # for technote-space/create-pr-action to push code
pull-requests: write # for technote-space/create-pr-action to create a PR

jobs:
check-versions:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: technote-space/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # refs/tags/v2.1.4
with:
EXECUTE_COMMANDS: |
./ci/update_versions.sh
Expand All @@ -35,8 +31,8 @@ jobs:
check-dictionary:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: technote-space/[email protected]
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # refs/tags/v2.1.4
with:
EXECUTE_COMMANDS: |
sudo apt-get update
Expand Down
8 changes: 8 additions & 0 deletions ci/update_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ eval "$(curl -fsSL https://raw.githubusercontent.com/electrocucaracha/pkg-mgr_sc

sed -i "s|PKG_VAGRANT_VERSION:-.*|PKG_VAGRANT_VERSION:-$PKG_VAGRANT_VERSION}|g" setup.sh
sed -i "s/vagrant version.*/vagrant version | awk 'NR==1\{print \$3}')\" != \"$PKG_VAGRANT_VERSION\" \]\]; then/g" validate.sh

# Update GitHub Action commit hashes
gh_actions=$(grep -r "uses: [a-z\-]*/[\_a-z\-]*@" .github/workflows/ | sed 's/@.*//' | awk -F ': ' '{ print $3 }' | sort | uniq)
for action in $gh_actions; do
commit_hash=$(git ls-remote --tags "https://github.com/$action" | grep 'refs/tags/[v]\?[0-9][0-9\.]*$' | awk '{ print $NF,$0 }' | sort -k1,1 -V | cut -f2- -d' ' | grep -oh '.*refs/tags/[v0-9\.]*$' | tail -1 | awk '{ printf "%s # %s\n",$1,$2 }')
# shellcheck disable=SC2267
grep -ElRZ "uses: $action@" .github/workflows/ | xargs -0 -l sed -i -e "s|uses: $action@.*|uses: $action@$commit_hash|g"
done

0 comments on commit 2aeae6f

Please sign in to comment.