Skip to content

chore(deps): update github artifact actions (major) #1800

chore(deps): update github artifact actions (major)

chore(deps): update github artifact actions (major) #1800

Workflow file for this run

name: 'Push: Test Code & Build Image'
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_call:
inputs:
skipImageBuild:
description: 'If images should be built'
default: false
required: false
type: boolean
permissions:
contents: write
packages: write
jobs:
golang-tests:
name: Golang Test
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
with:
go-version-file: 'go.mod'
- name: Run Go Tests
env:
TZ: "Europe/Berlin"
run: go test ./...
node-lint-tests:
name: Node Lint Test
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup PNPM
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with:
node-version-file: '.nvmrc'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Lint
run: pnpm lint
node-build-tests:
name: Node Build Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup PNPM
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with:
node-version-file: '.nvmrc'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run pnpm build
env:
NODE_OPTIONS: "--max-old-space-size=8192"
run: pnpm build
binary-build:
name: Binaries Build Test
needs:
- golang-tests
runs-on: ubuntu-latest
strategy:
matrix:
# build in parallel: linux/amd64, linux/arm64, windows/amd64
goos: [linux, windows]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
with:
go-version-file: 'go.mod'
- name: Run Go Build
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o fivenet .
build-image:
name: Image Build
if: ${{ github.event_name != 'pull_request' && !inputs.skipImageBuild }}
needs:
- node-lint-tests
- node-build-tests
- golang-tests
uses: ./.github/workflows/build_image.yml
secrets: inherit
update-dev-channel:
name: Update Dev Channel
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop' }}
needs:
- binary-build
- build-image
uses: ./.github/workflows/update-channel.yml
with:
channel: dev
image_tag: ${{ needs.build-image.outputs.image_tag }}