Skip to content

Commit

Permalink
Fix update versions bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed Oct 2, 2024
1 parent 8fbbf04 commit 1707315
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 43 deletions.
8 changes: 4 additions & 4 deletions .github/actions/docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ runs:
using: "composite"
steps:
- name: Get Docker Image layer contents
uses: MaxymVlasov/dive-action@379af3fc636888ada5899c997e8b52db6ad45023 # refs/tags/v1.0.1
uses: MaxymVlasov/dive-action@379af3fc636888ada5899c997e8b52db6ad45023 # 1.0.1
with:
image: ${{ inputs.image }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # refs/tags/v0.24.0
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0
with:
image-ref: "${{ inputs.image }}"
format: sarif
output: results.sarif
- name: Upload artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # refs/tags/v4.4.0
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # 4.4.0
with:
name: sarif
path: results.sarif
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@86b04fb0e47484f7282357688f21d5d0e32175fe # refs/tags/v3.26.9
uses: github/codeql-action/upload-sarif@86b04fb0e47484f7282357688f21d5d0e32175fe # 3.26.9
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/actions/vagrant-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
using: "composite"
steps:
- name: Cache Vagrant boxes
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # refs/tags/v4.0.2
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # 4.0.2
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ inputs.distro }}-${{ hashFiles('distros_supported.yml') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
github.event.review.state == 'approved'
) || github.event_name != 'pull_request_review'
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- name: Install requirements
env:
OS_KOLLA_BUILD_ARGS:
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
github.event.review.state == 'approved'
) || github.event_name != 'pull_request_review'
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- uses: ./.github/actions/vagrant-setup
with:
distro: ${{ matrix.distro }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/diagram.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,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/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- name: Update diagram
uses: githubocto/repo-visualizer@a999615bdab757559bf94bda1fe6eef232765f85 # refs/tags/0.9.1
uses: githubocto/repo-visualizer@a999615bdab757559bf94bda1fe6eef232765f85 # 0.9.1
with:
excluded_paths: "ignore,.github"
output_file: codebase-structure.svg
should_push: false
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # refs/tags/v2.1.4
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # 2.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:
pull-requests: write # for technote-space/create-pr-action to create a PR
runs-on: macos-12
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # refs/tags/v4.0.2
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # 4.0.2
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('distros_supported.yml') }}
restore-keys: |
${{ runner.os }}-vagrant-
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # refs/tags/v2.1.4
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # 2.1.4
env:
PROVIDER: virtualbox
with:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
name: Count Lines of Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # refs/tags/v5.0.2
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # 5.0.2
with:
go-version: ">=1.20.0"
- name: Install dependencies
Expand All @@ -31,15 +31,15 @@ jobs:
name: Check documentation external links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- name: Check broken links
uses: gaurav-nelson/github-action-markdown-link-check@499c1e7f3637c131334fa8e937c45144f79d72d2 # refs/tags/v1
uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec # 1.0.15
check-super-linter:
name: Check syntax (super-linter)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: github/super-linter@b807e99ddd37e444d189cfd2c2ca1274d8ae8ef1 # refs/tags/v7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- uses: github/super-linter@b807e99ddd37e444d189cfd2c2ca1274d8ae8ef1 # 7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: /
Expand All @@ -50,7 +50,7 @@ jobs:
name: Check syntax (tox)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- name: Install tox
run: pip install tox
- name: Run tox lint validation
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-demand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
) || github.event_name != 'pull_request_review'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- name: Run the sh-checker
uses: luizm/action-sh-checker@17bd25a6ee188d2b91f677060038f4ba37ba14b2 # refs/tags/v0.9.0
uses: luizm/action-sh-checker@17bd25a6ee188d2b91f677060038f4ba37ba14b2 # 0.9.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHFMT_OPTS: -i 4 -s
Expand All @@ -41,7 +41,7 @@ jobs:
name: Run BDD shell specs for Bash demo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- 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 Down
6 changes: 3 additions & 3 deletions .github/workflows/on-demand_aio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
github.event.review.state == 'approved'
) || github.event_name != 'pull_request_review'
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- name: Get matrix values
id: set-matrix
run: |
Expand All @@ -58,7 +58,7 @@ jobs:
distro: ${{ fromJson(needs.generate-json-matrix.outputs.matrix) }}
runs-on: macos-12
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- uses: ./.github/actions/vagrant-setup
with:
distro: ${{ matrix.distro }}
Expand All @@ -79,7 +79,7 @@ jobs:
github.event.review.state == 'approved'
) || github.event_name != 'pull_request_review'
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- name: Install requirements
run: |
sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-demand_noha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
VAGRANT_EXPERIMENTAL: disks
OS_NUM_COMPUTE_NODES: 1
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- uses: ./.github/actions/vagrant-setup
- name: Install GNU tools
run: brew install iproute2mac
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/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # refs/tags/1.8
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/scheduled_aio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
generate-json-matrix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- name: Get matrix values
id: set-matrix
run: |
Expand All @@ -45,7 +45,7 @@ jobs:
distro: ${{ fromJson(needs.generate-json-matrix.outputs.matrix) }}
runs-on: macos-12
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- uses: ./.github/actions/vagrant-setup
- name: Deploy latest release in All-in-One instance
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/spell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
name: Check spelling (reviewdog)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: reviewdog/action-misspell@1de44e0dd5efaaddf131937e4892afd8a0dc4b13 # refs/tags/v1.23.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- uses: reviewdog/action-misspell@1de44e0dd5efaaddf131937e4892afd8a0dc4b13 # 1.23.0
with:
github_token: ${{ secrets.github_token }}
check-spellcheck:
name: Check spelling (pyspelling)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: igsekor/pyspelling-any@155eb06641bb9259cab59b5126a40be943ecb4f7 # refs/tags/v1.0.4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- uses: igsekor/pyspelling-any@155eb06641bb9259cab59b5126a40be943ecb4f7 # 1.0.4
name: Spellcheck
12 changes: 6 additions & 6 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
image: ${{ matrix.image }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- name: install dependencies
shell: bash
run: |
Expand All @@ -51,7 +51,7 @@ jobs:
esac
$INSTALLER_CMD python3-pip git
pip3 install pip-tools
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # refs/tags/v2.1.4
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # 2.1.4
with:
EXECUTE_COMMANDS: |
bash -c 'source /etc/os-release; pip-compile --output-file="requirements/${{ matrix.os_release }}/${ID,,}_${VERSION_ID%.*}.txt" "requirements/${{ matrix.os_release }}/${ID,,}_${VERSION_ID%.*}.in" --upgrade'
Expand All @@ -65,8 +65,8 @@ 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/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # refs/tags/v2.1.4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # 2.1.4
with:
EXECUTE_COMMANDS: |
sudo apt-get update
Expand All @@ -93,8 +93,8 @@ 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/checkout@d632683dd7b4114ad314bca15554477dd762a938 # refs/tags/v4.2.0
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # refs/tags/v2.1.4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # 4.2.0
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # 2.1.4
with:
EXECUTE_COMMANDS: |
./ci/update_versions.sh
Expand Down
4 changes: 2 additions & 2 deletions ci/update_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ if [[ ${OS_DEBUG:-false} == "true" ]]; then
fi

# Update GitHub Action commit hashes
gh_actions=$(grep -r "uses: [a-zA-Z\-]*/[\_a-z\-]*@" .github/ | sed 's/@.*//' | awk -F ': ' '{ print $3 }' | sort | uniq)
gh_actions=$(grep -r "uses: [a-zA-Z\-]*/[\_a-z\-]*@" .github/ | sed 's/@.*//' | awk -F ': ' '{ print $3 }' | sort -u )
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 }')
commit_hash=$(git ls-remote "https://github.com/$action" | grep 'refs/tags/[v]\?[0-9][0-9\.]*$' | sed 's|refs/tags/[vV]\?[\.]\?||g' | sort -u -k2 -V | tail -1 | awk '{ printf "%s # %s\n",$1,$2 }')
# shellcheck disable=SC2267
grep -ElRZ "uses: $action@" .github/ | xargs -0 -l sed -i -e "s|uses: $action@.*|uses: $action@$commit_hash|g"
done

0 comments on commit 1707315

Please sign in to comment.