Skip to content

Commit

Permalink
Update actions dependencies (#538)
Browse files Browse the repository at this point in the history
* Update Github actions dependencies as well as Go and Node versions

* Update ui npm package dependency

* Create release.yml

* Fix golangci-lint action step

Change order of build action to allow for npm caching

* Add selfhosted field to bug issue template
  • Loading branch information
StevenWeathers authored Mar 28, 2024
1 parent 2ff4c40 commit f52b41b
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 52 deletions.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ body:
value: "A bug happened!"
validations:
required: true
- type: dropdown
id: selfhosted
attributes:
label: Self Hosted?
description: Was this bug experienced on your self hosted instance of Thunderdome?
multiple: false
options:
- Yes
- No
validations:
required: true
- type: input
id: version
attributes:
Expand Down
18 changes: 18 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
changelog:
exclude:
labels:
- ignore-for-release
authors:
- octocat
categories:
- title: Breaking Changes 🛠
labels:
- Semver-Major
- breaking-change
- title: Exciting New Features 🎉
labels:
- Semver-Minor
- enhancement
- title: Other Changes
labels:
- "*"
29 changes: 16 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:

strategy:
matrix:
node-version: [ "18.5.0" ]
go-version: [ "1.21" ]
node-version: [ "20.12.0" ]
go-version: [ "1.22" ]
db-host:
- 127.0.0.1

services:
postgres:
image: postgres:14
image: postgres:15
ports:
- 5432:5432
env:
Expand All @@ -32,19 +32,22 @@ jobs:
--health-retries 5
steps:
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: |
ui/package-lock.json
e2e/package-lock.json
- run: npm ci --no-optional
working-directory: ui
Expand All @@ -61,7 +64,7 @@ jobs:
run: go build -v .

- name: Archive build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
Expand All @@ -87,7 +90,7 @@ jobs:
env:
DB_HOST: ${{ matrix.db-host }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,37 @@ jobs:
DOCKER_CLI_EXPERIMENTAL: "enabled"
strategy:
matrix:
go-version: [ "1.21" ]
go-version: [ "1.22" ]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Docker Login
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Download build artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -49,7 +49,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -63,4 +63,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
30 changes: 16 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,40 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.21' ]
go: [ "1.22" ]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: false

- name: Check formatting
uses: Jerome1337/gofmt-action@v1.0.5
with:
gofmt-path: '.'
gofmt-flags: '-l -d'
- name: Copy swagger docs dummy file and Create dummy ui/dist/index.html
run: mkdir ui/dist && touch ui/dist/index.html

- name: Goimports Check
uses: DarthBenro008/goimports-check-action@v0.1.0
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
root-path: './'
# 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
version: v1.54

ui:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ "18.5.0" ]
node-version: [ "20.12.0" ]

steps:
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- run: npm ci --no-optional
working-directory: ui
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ jobs:

strategy:
matrix:
go-version: [ "1.21" ]
go-version: [ "1.22" ]

steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Copy swagger docs dummy file and Create dummy ui/dist/index.html
run: mkdir ui/dist && touch ui/dist/index.html
Expand Down
6 changes: 6 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
linters:
disable:
- errcheck
enable:
- goimports
- gofmt
4 changes: 2 additions & 2 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
############################
# STEP 1 build the ui
############################
FROM node:18.5 as builderNode
FROM node:20.12 as builderNode

RUN mkdir /webapp
COPY ./ui/ /webapp/ui/
Expand All @@ -14,7 +14,7 @@ RUN npm run build
############################
# STEP 2 build executable binary
############################
FROM golang:1.21-alpine as builderGo
FROM golang:1.22-alpine as builderGo
ARG BUILD_VERSION
# Install git + SSL ca certificates.
# Git is required for fetching the dependencies.
Expand Down
12 changes: 6 additions & 6 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f52b41b

Please sign in to comment.