Skip to content

Commit

Permalink
[Enhancement] - Fix gha actions warnings (#554)
Browse files Browse the repository at this point in the history
Updated actions to work with new GHA features, preventing future builds from breaking because they are outdated.
  • Loading branch information
beats-dh authored Nov 1, 2022
1 parent 281369e commit 03d6389
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/actions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Automated Version Bump
description: Automated version bump for npm packages.
runs:
using: node12
using: node16
main: index.js
branding:
icon: chevron-up
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/analysis-codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@main

- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@master
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/analysis-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@main

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand All @@ -48,7 +48,7 @@ jobs:
sudo update-alternatives --set gcc /usr/bin/gcc-11
- name: CCache
uses: hendrikmuhs/ccache-action@v1.2
uses: hendrikmuhs/ccache-action@main
with:
max-size: "1G"
key: ccache-${{ matrix.os }}-${{ matrix.buildtype }}
Expand All @@ -57,17 +57,18 @@ jobs:
- name: Restore artifacts, or setup vcpkg (do not install any package)
if: ${{ matrix.language == 'cpp' }}
uses: lukka/run-vcpkg@v10
uses: lukka/run-vcpkg@main
with:
vcpkgGitCommitId: 8b62d95a81afcb9efe74bebeb62f04c1e0e2a003
vcpkgGitURL: "https://github.com/opentibiabr/vcpkg.git"
vcpkgGitCommitId: 2400585c812a27a7d93461bf84f2907f42367904

- name: Get latest CMake and ninja
if: ${{ matrix.language == 'cpp' }}
uses: lukka/get-cmake@latest
uses: lukka/get-cmake@main

- name: Run CMake
if: ${{ matrix.language == 'cpp' }}
uses: lukka/run-cmake@v10
uses: lukka/run-cmake@main
with:
configurePreset: ${{ matrix.buildtype }}
buildPreset: ${{ matrix.buildtype }}
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/analysis-reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
steps:

- name: Check out code.
uses: actions/checkout@master
uses: actions/checkout@main

- name: Setup reviewdog
uses: reviewdog/action-setup@v1
uses: reviewdog/action-setup@v1.0.3

- name: Setup cppcheck
run: sudo apt-get update && sudo apt-get install -y cppcheck
Expand All @@ -33,10 +33,10 @@ jobs:
steps:

- name: Check out code.
uses: actions/checkout@master
uses: actions/checkout@main

- name: Setup reviewdog
uses: reviewdog/action-setup@v1
uses: reviewdog/action-setup@v1.0.3

- name: Setup Lua/Luacheck
run: sudo apt-get update && sudo apt-get install -y libluajit-5.1-dev lua-check
Expand All @@ -55,10 +55,10 @@ jobs:
steps:

- name: Check out code.
uses: actions/checkout@master
uses: actions/checkout@main

- name: Setup reviewdog
uses: reviewdog/action-setup@v1
uses: reviewdog/action-setup@v1.0.3

- name: Setup Lua/Luacheck
run: sudo apt-get update && sudo apt-get install -y libluajit-5.1-dev lua-check
Expand All @@ -77,10 +77,10 @@ jobs:
steps:

- name: Check out code.
uses: actions/checkout@master
uses: actions/checkout@main

- name: shellcheck
uses: reviewdog/action-shellcheck@v1
uses: reviewdog/action-shellcheck@v1.15.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
Expand All @@ -93,10 +93,10 @@ jobs:
steps:

- name: Check out code.
uses: actions/checkout@master
uses: actions/checkout@main

- name: Setup reviewdog
uses: reviewdog/action-setup@v1
uses: reviewdog/action-setup@v1.0.3

- name: Setup xmllint
run: sudo apt-get update && sudo apt-get install -y libxml2-utils
Expand All @@ -115,10 +115,10 @@ jobs:
steps:

- name: Check out code.
uses: actions/checkout@master
uses: actions/checkout@main

- name: Run yamllint
uses: reviewdog/action-yamllint@v1
uses: reviewdog/action-yamllint@v1.6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
Expand All @@ -129,9 +129,9 @@ jobs:
steps:

- name: Check out code
uses: actions/checkout@master
uses: actions/checkout@main

- name: hadolint
uses: reviewdog/action-hadolint@v1
uses: reviewdog/action-hadolint@v1.33.0
with:
reporter: github-pr-check
18 changes: 10 additions & 8 deletions .github/workflows/analysis-sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@main
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- uses: actions/checkout@v3
- uses: actions/checkout@main
if: ${{ github.event_name == 'push' }}

- name: Install Linux Dependencies
Expand All @@ -44,7 +44,7 @@ jobs:
- name: CCache
id: ccache
uses: actions/cache@v3
uses: actions/cache@main
with:
path: $HOME/.ccache
key: ccache-${{ runner.os}}-${{ matrix.buildtype }}-${{ hashFiles('**/src') }}
Expand All @@ -53,7 +53,7 @@ jobs:
ccache-${{ runner.os}}-
- name: Sonar cache
uses: actions/cache@v3
uses: actions/cache@main
with:
path: $HOME/.cfamily
key: sonar-${{ runner.os}}-${{ matrix.buildtype }}-${{ hashFiles('**/src') }}
Expand All @@ -62,7 +62,7 @@ jobs:
sonar-${{ runner.os}}-
- name: Cache SonarCloud packages
uses: actions/cache@v3
uses: actions/cache@main
with:
path: $HOME/.sonar/cache
key: sonar-${{ runner.os}}-${{ matrix.buildtype }}-${{ hashFiles('**/src') }}
Expand All @@ -71,13 +71,15 @@ jobs:
sonar-${{ runner.os}}-
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@v10
uses: lukka/run-vcpkg@main
with:
vcpkgGitCommitId: 8b62d95a81afcb9efe74bebeb62f04c1e0e2a003
vcpkgGitURL: "https://github.com/opentibiabr/vcpkg.git"
vcpkgGitCommitId: 2400585c812a27a7d93461bf84f2907f42367904

- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11

- name: Download and set up sonar-scanner
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,42 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@main
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected].11
uses: gittools/actions/gitversion/[email protected].15
with:
versionSpec: '5.x'

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected].11
uses: gittools/actions/gitversion/[email protected].15

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2.1.0
with:
install: true

- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@main
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build
if: ${{ github.event_name == 'pull_request' }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3.2.0
with:
file: docker/server/Dockerfile
tags: ghcr.io/${{ github.repository }}:${{ steps.gitversion.outputs.semVer }}
Expand All @@ -58,7 +58,7 @@ jobs:
- name: Build and push
id: docker_build
if: ${{ github.event_name == 'push' }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3.2.0
with:
file: docker/server/Dockerfile
push: true
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@main

- name: Install Linux Dependencies
run: >
Expand All @@ -43,29 +43,30 @@ jobs:
sudo update-alternatives --set gcc /usr/bin/gcc-11
- name: CCache
uses: hendrikmuhs/ccache-action@v1.2
uses: hendrikmuhs/ccache-action@main
with:
max-size: "1G"
key: ccache-${{ matrix.os }}-${{ matrix.buildtype }}
restore-keys: |
ccache-${{ matrix.os }}
- name: Restore artifacts and install vcpkg
uses: lukka/run-vcpkg@v10
uses: lukka/run-vcpkg@main
with:
vcpkgGitCommitId: 8b62d95a81afcb9efe74bebeb62f04c1e0e2a003
vcpkgGitURL: "https://github.com/opentibiabr/vcpkg.git"
vcpkgGitCommitId: 2400585c812a27a7d93461bf84f2907f42367904

- name: Get latest CMake and ninja
uses: lukka/get-cmake@latest
uses: lukka/get-cmake@main

- name: Run CMake
uses: lukka/run-cmake@v10
uses: lukka/run-cmake@main
with:
configurePreset: ${{ matrix.buildtype }}
buildPreset: ${{ matrix.buildtype }}

- name: Create and Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@main
with:
name: canary-${{ matrix.buildtype }}-${{ github.sha }}
path: |
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@main

- name: CCache
uses: hendrikmuhs/ccache-action@v1.2
uses: hendrikmuhs/ccache-action@main
with:
max-size: "1G"
variant: "sccache"
Expand All @@ -44,21 +44,22 @@ jobs:
run: rm -r -fo C:/mysql*

- name: Restore artifacts and install vcpkg
uses: lukka/run-vcpkg@v10
uses: lukka/run-vcpkg@main
with:
vcpkgGitCommitId: 8b62d95a81afcb9efe74bebeb62f04c1e0e2a003
vcpkgGitURL: "https://github.com/opentibiabr/vcpkg.git"
vcpkgGitCommitId: 2400585c812a27a7d93461bf84f2907f42367904

- name: Get latest CMake and ninja
uses: lukka/get-cmake@latest
uses: lukka/get-cmake@main

- name: Run CMake
uses: lukka/run-cmake@v10
uses: lukka/run-cmake@main
with:
configurePreset: ${{ matrix.buildtype }}
buildPreset: ${{ matrix.buildtype }}

- name: Create and Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@main
with:
name: canary-${{ matrix.buildtype }}-${{ github.sha }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: 'Checkout source code'
uses: 'actions/checkout@v2'
uses: 'actions/checkout@main'
with:
ref: ${{ github.ref }}
- name: 'cat package.json'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 120 days with no activity.'
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/tests-lua.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
push:
branches:
- main
- dev
- devel
- develop

jobs:
job:
Expand All @@ -23,4 +20,4 @@ jobs:
run: sudo apt-get install -y libluajit-5.1-dev

- name: Check out code.
uses: actions/checkout@v1
uses: actions/checkout@main

0 comments on commit 03d6389

Please sign in to comment.