From 2b696f6a046007095953b72a7697bad06b165e87 Mon Sep 17 00:00:00 2001 From: Evan Sims Date: Mon, 1 Apr 2024 18:57:41 -0500 Subject: [PATCH] chore(ci): update GitHub Workflows and Actions --- .github/workflows/main.yaml | 19 +++++----- .../.github/workflows/main.yaml.mustache | 12 +++---- .../go/template/.github/workflows/main.yaml | 36 +++++++++---------- .../.github/workflows/main.yml.mustache | 21 ++++++----- .../js/template/.github/workflows/main.yaml | 18 +++++----- .../template/.github/workflows/main.yaml | 12 +++---- 6 files changed, 58 insertions(+), 60 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a3c1c557..cf8958d0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -29,7 +29,7 @@ jobs: path: clients/fga-js-sdk - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0 - name: Run SDK Tests run: make test-client-js @@ -59,7 +59,7 @@ jobs: path: clients/fga-go-sdk - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0 - name: Run SDK Tests run: make test-client-go @@ -89,7 +89,7 @@ jobs: path: clients/fga-dotnet-sdk - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0 - name: Run All Tests run: make test-client-dotnet @@ -105,7 +105,6 @@ jobs: git status git diff - build-and-test-python-sdk: runs-on: ubuntu-latest steps: @@ -114,9 +113,9 @@ jobs: fetch-depth: 0 - name: Specify python version - uses: actions/setup-python@v5 + uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: - python-version: '3.10' + python-version: "3.10" - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: @@ -125,7 +124,7 @@ jobs: path: clients/fga-python-sdk - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0 - name: Run All Tests run: |- @@ -153,8 +152,8 @@ jobs: uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 with: java-version: 11 - distribution: 'temurin' - cache: 'gradle' + distribution: "temurin" + cache: "gradle" - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: @@ -163,7 +162,7 @@ jobs: path: clients/fga-java-sdk - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0 - name: Run All Tests run: |- diff --git a/config/clients/dotnet/template/.github/workflows/main.yaml.mustache b/config/clients/dotnet/template/.github/workflows/main.yaml.mustache index 9bcfd30c..fd191c19 100644 --- a/config/clients/dotnet/template/.github/workflows/main.yaml.mustache +++ b/config/clients/dotnet/template/.github/workflows/main.yaml.mustache @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 @@ -30,7 +30,7 @@ jobs: - name: Test run: dotnet test --no-build --verbosity normal - - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0 + - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.1 with: name: nuget-package path: src/<%packageName%>/bin/Release/<%packageName%>.*.nupkg @@ -41,7 +41,7 @@ jobs: needs: [test] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 @@ -59,7 +59,7 @@ jobs: - name: Build run: dotnet build --no-restore --configuration Release - - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0 + - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.1 with: name: nuget-package path: src/<%packageName%>/bin/Release/<%packageName%>.*.nupkg @@ -75,11 +75,11 @@ jobs: needs: publish steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - - uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 + - uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 # v3.0.1 with: version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ env: diff --git a/config/clients/go/template/.github/workflows/main.yaml b/config/clients/go/template/.github/workflows/main.yaml index 7fc49de4..b2effdcd 100644 --- a/config/clients/go/template/.github/workflows/main.yaml +++ b/config/clients/go/template/.github/workflows/main.yaml @@ -10,27 +10,27 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.5.4 - with: - fetch-depth: 0 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + with: + fetch-depth: 0 - - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 - with: - cache-dependency-path: './go.sum' - check-latest: true - go-version: '>=1.21.1' + - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + cache-dependency-path: "./go.sum" + check-latest: true + go-version: ">=1.21.1" - - name: Build - run: go build -v ./... + - name: Build + run: go build -v ./... - - name: Test - run: go test -v ./... + - name: Test + run: go test -v ./... - - name: Install govulncheck - run: go install golang.org/x/vuln/cmd/govulncheck@latest + - name: Install govulncheck + run: go install golang.org/x/vuln/cmd/govulncheck@latest - - name: Run govulncheck - run: govulncheck ./... + - name: Run govulncheck + run: govulncheck ./... create-release: runs-on: ubuntu-latest @@ -38,11 +38,11 @@ jobs: needs: [test] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.5.4 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - - uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 + - uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 # v3.0.1 with: version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ env: diff --git a/config/clients/java/template/.github/workflows/main.yml.mustache b/config/clients/java/template/.github/workflows/main.yml.mustache index c9d4b2b2..07dff2a2 100644 --- a/config/clients/java/template/.github/workflows/main.yml.mustache +++ b/config/clients/java/template/.github/workflows/main.yml.mustache @@ -14,9 +14,9 @@ jobs: matrix: java: [ '11', '17', '21' ] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.2 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Set up JDK - uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0 + uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 with: {{=< >=}} java-version: ${{ matrix.java }} @@ -27,7 +27,6 @@ jobs: - name: Test and Build with Gradle run: | ./gradlew build test-integration - publish-maven-central: runs-on: ubuntu-latest @@ -38,16 +37,16 @@ jobs: needs: [test] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.2 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Set up JDK - uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0 + uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 with: java-version: 11 distribution: 'temurin' - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@699bb18358f12c5b78b37bb0111d3a0e2276e0e2 # v2.1.1 + uses: gradle/wrapper-validation-action@b231772637bb498f11fdbc86052b6e8a8dc9fc92 # v2.1.2 - name: Publish package uses: gradle/gradle-build-action@29c0906b64b8fc82467890bfb7a0a7ef34bda89e # v3.1.0 @@ -69,16 +68,16 @@ jobs: needs: [test] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.2 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Set up JDK - uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0 + uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 with: java-version: 11 distribution: 'temurin' - name: Validate Gradle wrapper - uses: gradle/wrapper-validation-action@699bb18358f12c5b78b37bb0111d3a0e2276e0e2 # v2.1.1 + uses: gradle/wrapper-validation-action@b231772637bb498f11fdbc86052b6e8a8dc9fc92 # v2.1.2 - name: Publish package uses: gradle/gradle-build-action@29c0906b64b8fc82467890bfb7a0a7ef34bda89e # v3.1.0 @@ -96,9 +95,9 @@ jobs: needs: [publish-maven-central, publish-github-packages] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 + - uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 # v3.0.1 with: version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ env: diff --git a/config/clients/js/template/.github/workflows/main.yaml b/config/clients/js/template/.github/workflows/main.yaml index c7a17c1d..9205a54d 100644 --- a/config/clients/js/template/.github/workflows/main.yaml +++ b/config/clients/js/template/.github/workflows/main.yaml @@ -26,10 +26,10 @@ jobs: uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: ${{ matrix.node-version }} - registry-url: 'https://registry.npmjs.org' - scope: '@openfga' + registry-url: "https://registry.npmjs.org" + scope: "@openfga" always-auth: false - cache: 'npm' + cache: "npm" - name: Install dependencies run: npm ci @@ -48,8 +48,8 @@ jobs: - name: Set up node uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: '20' - cache: 'npm' + node-version: "20" + cache: "npm" - name: Install dependencies run: npm ci @@ -79,11 +79,11 @@ jobs: - name: Set up node uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: - node-version: '20' - registry-url: 'https://registry.npmjs.org' - scope: '@openfga' + node-version: "20" + registry-url: "https://registry.npmjs.org" + scope: "@openfga" always-auth: false - cache: 'npm' + cache: "npm" - name: Install dependencies run: npm ci diff --git a/config/clients/python/template/.github/workflows/main.yaml b/config/clients/python/template/.github/workflows/main.yaml index 4a35200c..8d4ff770 100644 --- a/config/clients/python/template/.github/workflows/main.yaml +++ b/config/clients/python/template/.github/workflows/main.yaml @@ -14,12 +14,12 @@ jobs: matrix: python-version: ["3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: python-version: ${{ matrix.python-version }} cache: "pip" @@ -44,12 +44,12 @@ jobs: id-token: write steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 with: python-version: "3.10" cache: "pip" @@ -66,7 +66,7 @@ jobs: python setup.py sdist bdist_wheel - name: Publish package - uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf + uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14 create-release: runs-on: ubuntu-latest @@ -74,7 +74,7 @@ jobs: needs: [publish] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: fetch-depth: 0