Bump actions/setup-node from 4.0.4 to 4.1.0 in the github-actions gro… #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub recommends pinning actions to a commit SHA. | |
# To get a newer version, you will need to update the SHA. | |
# You can also reference a tag or branch, but the action may change without warning. | |
name: Push CI Pipeline | |
on: | |
push: | |
branches: ["develop", "main", "release/*"] | |
jobs: | |
changed-services: | |
runs-on: ubuntu-latest | |
outputs: | |
services: ${{ steps.changed-services.outputs.services }} | |
services_count: ${{ steps.changed-services.outputs.services_count }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- run: go mod tidy | |
- uses: actions/setup-node@v4.1.0 | |
with: | |
node-version: 20 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v45 | |
with: | |
json: true | |
escape_json: false | |
- name: Get changed services that should rebuild | |
id: changed-services | |
uses: ./.github/actions/changed-services | |
with: | |
changed-files: ${{ steps.changed-files.outputs.all_changed_files }} | |
base-repository: ventive/go-mono-template | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21" | |
cache: true | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 | |
with: | |
# Require: The version of golangci-lint to use. | |
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. | |
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. | |
version: v1.55.2 | |
args: --timeout=30m | |
skip-cache: true | |
test: | |
needs: [lint] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
cache: true | |
- name: Test | |
uses: robherley/go-test-action@v0.5.0 | |
vulncheck: | |
needs: [test, changed-services] | |
if: needs.changed-services.outputs.services_count != 0 | |
strategy: | |
fail-fast: false | |
matrix: | |
service: ${{ fromJSON(needs.changed-services.outputs.services) }} | |
uses: ./.github/workflows/govulncheck.yml | |
with: | |
workspace: ${{ matrix.service }} | |
secrets: inherit | |
build_and_publish_images: | |
needs: [vulncheck, changed-services] | |
if: needs.changed-services.outputs.services_count != 0 | |
strategy: | |
fail-fast: false | |
matrix: | |
service: ${{ fromJSON(needs.changed-services.outputs.services) }} | |
uses: ./.github/workflows/ghcr.yml | |
with: | |
workspace: ${{ matrix.service }} | |
secrets: inherit |