diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d70801ed54..2010ae675b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -3,9 +3,9 @@ name: "CodeQL" on: pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [master] schedule: - - cron: '30 5,17 * * *' + - cron: "30 5,17 * * *" permissions: contents: read @@ -13,7 +13,7 @@ permissions: jobs: analyze: permissions: - security-events: write # for github/codeql-action/autobuild to send a status report + security-events: write # for github/codeql-action/autobuild to send a status report name: Analyze if: github.repository_owner == 'mattermost' runs-on: ubuntu-latest @@ -21,38 +21,37 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'go', 'javascript' ] + language: ["go", "javascript"] steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3.28.11 - with: - languages: ${{ matrix.language }} - debug: false - config-file: ./.github/codeql/codeql-config.yml + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11 + with: + languages: ${{ matrix.language }} + debug: false + config-file: ./.github/codeql/codeql-config.yml - - name: Build JavaScript - uses: github/codeql-action/autobuild@v3.28.11 - if: ${{ matrix.language == 'javascript' }} + - name: Build JavaScript + uses: github/codeql-action/autobuild@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11 + if: ${{ matrix.language == 'javascript' }} - - name: Setup go - uses: actions/setup-go@v5 - with: - go-version-file: server/go.mod - if: ${{ matrix.language == 'go' }} + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version-file: server/go.mod + if: ${{ matrix.language == 'go' }} + - name: Build Golang + run: | + cd server + make setup-go-work + make build-linux-amd64 + if: ${{ matrix.language == 'go' }} - - name: Build Golang - run: | - cd server - make setup-go-work - make build-linux-amd64 - if: ${{ matrix.language == 'go' }} - - # Perform Analysis - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3.28.11 + # Perform Analysis + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11 diff --git a/.github/workflows/esrupgrade-common.yml b/.github/workflows/esrupgrade-common.yml index 0c04900836..983ecc2ed6 100644 --- a/.github/workflows/esrupgrade-common.yml +++ b/.github/workflows/esrupgrade-common.yml @@ -89,7 +89,7 @@ jobs: # We skip the very last line, which simply contains the date of the dump head -n -1 ${DUMP_SERVER_NAME} | gzip > ${DUMP_SERVER_NAME}.gz - name: Upload dump - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 with: name: upgraded-dump-server path: ${{ env.DUMP_SERVER_NAME }}.gz @@ -134,7 +134,7 @@ jobs: # We skip the very last line, which simply contains the date of the dump head -n -1 ${DUMP_SCRIPT_NAME} | gzip > ${DUMP_SCRIPT_NAME}.gz - name: Upload dump - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 with: name: upgraded-dump-script path: ${{ env.DUMP_SCRIPT_NAME }}.gz @@ -145,7 +145,7 @@ jobs: - esr-upgrade-script steps: - name: Retrieve dumps - uses: actions/download-artifact@v4 + uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9 - name: Diff dumps run: | gzip -d upgraded-dump-server/${DUMP_SERVER_NAME}.gz @@ -153,7 +153,7 @@ jobs: diff upgraded-dump-server/$DUMP_SERVER_NAME upgraded-dump-script/$DUMP_SCRIPT_NAME > $DIFF_NAME - name: Upload diff if: failure() # Upload the diff only if the previous step failed; i.e., if the diff is non-empty - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 with: name: dumps-diff path: ${{ env.DIFF_NAME }} diff --git a/.github/workflows/mmctl-test-template.yml b/.github/workflows/mmctl-test-template.yml index 9bceb0b09e..f0c35a26a0 100644 --- a/.github/workflows/mmctl-test-template.yml +++ b/.github/workflows/mmctl-test-template.yml @@ -31,9 +31,9 @@ jobs: - name: Store required variables for publishing results run: | echo "${{ inputs.name }}" > server/test-name - echo "${{ github.event.pull_request.number }}" > server/pr-number + echo "${{ github.event.pull_request.number }}" > server/pr-number - name: Setup Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.GO_VERSION }} cache-dependency-path: server/go.sum diff --git a/.github/workflows/server-ci-template.yml b/.github/workflows/server-ci-template.yml index bcba58a55d..369cf0e571 100644 --- a/.github/workflows/server-ci-template.yml +++ b/.github/workflows/server-ci-template.yml @@ -19,7 +19,7 @@ jobs: id: go run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}" - name: Setup Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.GO_VERSION }} cache-dependency-path: | @@ -44,7 +44,7 @@ jobs: id: go run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}" - name: Setup Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.GO_VERSION }} cache-dependency-path: | @@ -69,7 +69,7 @@ jobs: id: go run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}" - name: Setup Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.GO_VERSION }} cache-dependency-path: | @@ -92,7 +92,7 @@ jobs: id: go run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}" - name: Setup Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.GO_VERSION }} cache-dependency-path: | @@ -117,7 +117,7 @@ jobs: id: go run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}" - name: Setup Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.GO_VERSION }} cache-dependency-path: | @@ -144,7 +144,7 @@ jobs: id: go run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}" - name: Setup Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.GO_VERSION }} cache-dependency-path: | @@ -195,7 +195,7 @@ jobs: id: go run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}" - name: Setup Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.GO_VERSION }} cache-dependency-path: | @@ -220,7 +220,7 @@ jobs: id: go run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}" - name: Setup Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.GO_VERSION }} cache-dependency-path: | @@ -288,7 +288,7 @@ jobs: id: go run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}" - name: Setup Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.GO_VERSION }} cache-dependency-path: | diff --git a/.github/workflows/server-test-template.yml b/.github/workflows/server-test-template.yml index 00fa9bc688..c8627c55f7 100644 --- a/.github/workflows/server-test-template.yml +++ b/.github/workflows/server-test-template.yml @@ -29,7 +29,7 @@ jobs: working-directory: ./server run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}" - name: Setup Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: go-version: ${{ steps.go.outputs.GO_VERSION }} cache-dependency-path: server/go.sum @@ -77,4 +77,4 @@ jobs: server/gotestsum.json server/report.xml server/test-name - server/pr-number \ No newline at end of file + server/pr-number diff --git a/webapp/channels/.github/workflows/performance-benchmarks.yml b/webapp/channels/.github/workflows/performance-benchmarks.yml index 5ffade4333..9360a7ad30 100644 --- a/webapp/channels/.github/workflows/performance-benchmarks.yml +++ b/webapp/channels/.github/workflows/performance-benchmarks.yml @@ -21,14 +21,14 @@ jobs: - 5432:5432 steps: - name: Check out web app - uses: actions/checkout@v3 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version: 16.10.0 - name: Download and install Cypress - uses: cypress-io/github-action@v5 + uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16 with: runTests: false working-directory: e2e/cypress @@ -56,7 +56,7 @@ jobs: mv client-original/products mattermost/client/products fi - name: Run the E2E tests - uses: cypress-io/github-action@v5 + uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16 with: browser: chrome config: video=true,videosFolder=tests/videos @@ -72,28 +72,28 @@ jobs: MM_TEAMSETTINGS_ENABLEOPENSERVER: true - name: Upload Cypress logs if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 with: name: Cypress logs path: e2e/cypress/tests/integration/performance/logs/ retention-days: 3 - name: Upload Mattermost logs if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 with: name: Mattermost logs path: e2e/cypress/mattermost/logs/mattermost.log retention-days: 3 - name: Upload screenshots if: ${{ failure() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 with: name: Test screenshots path: e2e/cypress/tests/screenshots retention-days: 3 - name: Upload videos if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 with: name: Test Videos path: e2e/cypress/tests/videos