diff --git a/plugin-ci/build/action.yaml b/plugin-ci/build/action.yaml index c34384c..c4fa8ed 100644 --- a/plugin-ci/build/action.yaml +++ b/plugin-ci/build/action.yaml @@ -6,13 +6,13 @@ description: | runs: using: "composite" steps: - - name: ci/build + - name: build-plugin shell: bash run: make dist env: CGO_ENABLED: "0" - - name: ci/release-notes + - name: generate-release-notes shell: bash run: | printf "Supported Mattermost Server Versions: **$(cat plugin.json | jq .min_server_version -r)+** \n## Enhancements\n\n## Fixes\n" >> dist/release-notes.md @@ -22,7 +22,8 @@ runs: git log --pretty='format:- %h %s' --abbrev-commit --no-decorate --no-color $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..HEAD >> dist/release-notes.md fi - - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1 + - name: upload-plugin-package + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: name: dist path: | diff --git a/plugin-ci/lint/action.yaml b/plugin-ci/lint/action.yaml index e286ba5..debe7dd 100644 --- a/plugin-ci/lint/action.yaml +++ b/plugin-ci/lint/action.yaml @@ -6,24 +6,24 @@ description: | runs: using: "composite" steps: - - name: ci/check-style + - name: check-style shell: bash run: make check-style - - name: ci/tidy-mod + - name: tidy-mod shell: bash run: go mod tidy -v - - name: ci/diff-mod + - name: diff-mod shell: bash run: | git --no-pager diff --exit-code go.mod go.sum || (echo "Please run \"go mod tidy\" and commit the changes in go.mod and go.sum." && exit 1) - - name: ci/apply + - name: apply shell: bash run: make apply - - name: ci/diff-manifests + - name: diff-manifests shell: bash run: | git --no-pager diff --exit-code *manifest.* || (echo "Please run \"make apply\" and commit the changes in the generated manifests." && exit 1) diff --git a/plugin-ci/setup/action.yaml b/plugin-ci/setup/action.yaml index b0dca89..2b1ff35 100644 --- a/plugin-ci/setup/action.yaml +++ b/plugin-ci/setup/action.yaml @@ -14,12 +14,6 @@ inputs: The version to use for golangci-lint required: false - golang-cache-enabled: - default: "true" - description: | - Enable golang caching in CI - required: false - golang-version: default: "1.21" description: | @@ -29,7 +23,7 @@ inputs: runs: using: "composite" steps: - - name: Check for webapp + - name: check-if-plugin-has-webapp id: webapp_check shell: bash run: | @@ -39,7 +33,7 @@ runs: echo "exist=false" >> $GITHUB_OUTPUT fi - - name: Install Node + - name: install-node if: steps.webapp_check.outputs.exist == 'true' uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 with: @@ -47,13 +41,12 @@ runs: cache: "npm" cache-dependency-path: webapp/package-lock.json - - name: Install golangci-lint + - name: setup-go + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + go-version: ${{ inputs.golang-version }} + + - name: install-golangci-lint shell: bash run: | curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${{ inputs.golangci-lint-version }} - - - name: Setup Go - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 - with: - go-version: ${{ inputs.golang-version }} - cache: ${{ inputs.golang-cache-enabled }} diff --git a/plugin-ci/test/action.yaml b/plugin-ci/test/action.yaml index 3759e26..ab76811 100644 --- a/plugin-ci/test/action.yaml +++ b/plugin-ci/test/action.yaml @@ -6,14 +6,15 @@ description: | runs: using: "composite" steps: - - name: ci/test + - name: test-plugin shell: bash run: make test - - name: ci/goverage + - name: generate-goverage shell: bash run: make coverage - - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + - name: upload-coverage + uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 with: files: server/coverage.txt