Skip to content

Commit e303d8f

Browse files
committed
updated & local builds
1 parent 426708c commit e303d8f

File tree

3 files changed

+77
-85
lines changed

3 files changed

+77
-85
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ name: "CodeQL"
77

88
on:
99
push:
10-
branches: [master]
10+
branches: [ master ]
1111
pull_request:
1212
# The branches below must be a subset of the branches above
13-
branches: [master]
13+
branches: [ master ]
1414
schedule:
15-
- cron: '0 16 * * 1'
15+
- cron: '0 16 * * 1'
1616

1717
jobs:
1818
analyze:
@@ -24,13 +24,13 @@ jobs:
2424
matrix:
2525
# Override automatic language detection by changing the below list
2626
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
27-
language: ['go']
27+
language: [ 'go' ]
2828
# Learn more...
2929
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
3030

3131
steps:
3232
- name: Checkout repository
33-
uses: actions/checkout@v2
33+
uses: actions/checkout@v5
3434
with:
3535
# We must fetch at least the immediate parents so that if this is
3636
# a pull request then we can checkout the head.
@@ -43,18 +43,18 @@ jobs:
4343

4444
# Initializes the CodeQL tools for scanning.
4545
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v1
46+
uses: github/codeql-action/init@v3
4747
with:
4848
languages: ${{ matrix.language }}
4949
# If you wish to specify custom queries, you can do so here or in a config file.
50-
# By default, queries listed here will override any specified in a config file.
50+
# By default, queries listed here will override any specified in a config file.
5151
# Prefix the list here with "+" to use these queries and those in the config file.
5252
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5353

54-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55-
# If this step fails, then you should remove it and run the build manually (see below)
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
5656
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v1
57+
uses: github/codeql-action/autobuild@v3
5858

5959
# ℹ️ Command-line programs to run using the OS shell.
6060
# 📚 https://git.io/JvXDl
@@ -68,4 +68,4 @@ jobs:
6868
# make release
6969

7070
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v1
71+
uses: github/codeql-action/analyze@v3

.github/workflows/development.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
name: Development
2-
on: [push, pull_request]
2+
on: [ push, pull_request ]
33
jobs:
44
lint:
55
name: golangci-lint
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v3
9-
with:
10-
fetch-depth: 20
11-
- name: Run golangci-lint
12-
uses: golangci/golangci-lint-action@v3
13-
with:
14-
version: latest
15-
args: "-v --new-from-rev HEAD~5 --timeout=5m"
8+
- uses: actions/checkout@v5
9+
with:
10+
fetch-depth: 20
11+
- name: Run golangci-lint
12+
uses: golangci/golangci-lint-action@v8
13+
with:
14+
version: latest
15+
args: "-v --new-from-rev HEAD~5 --timeout=5m"
1616
test-build-upload:
1717
strategy:
1818
matrix:
19-
go-version: [1.22.x]
20-
platform: [ubuntu-latest]
19+
go-version: [ 1.25.x ]
20+
platform: [ ubuntu-latest ]
2121
runs-on: ${{ matrix.platform }}
2222
steps:
2323
- name: Install Go
24-
uses: actions/setup-go@v3
24+
uses: actions/setup-go@v6
2525
with:
2626
go-version: ${{ matrix.go-version }}
2727
stable: false
2828
- name: Checkout code
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@v5
3030
with:
31-
fetch-depth: 0
31+
fetch-depth: 0
3232
- name: Test
3333
run: go test ./... -mod=vendor
3434
- name: Build
3535
run: |
3636
mkdir -p output/{win,lin,arm,mac}
3737
VERSION=$(git describe --tags)
38-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -X github.com/42wim/matterbridge/version.GitHash=$(git log --pretty=format:'%h' -n 1)" -o output/lin/matterbridge-$VERSION-linux-amd64
39-
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -X github.com/42wim/matterbridge/version.GitHash=$(git log --pretty=format:'%h' -n 1)" -o output/win/matterbridge-$VERSION-windows-amd64.exe
40-
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -X github.com/42wim/matterbridge/version.GitHash=$(git log --pretty=format:'%h' -n 1)" -o output/mac/matterbridge-$VERSION-darwin-amd64
38+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -X github.com/${{ github.repository }}/version.GitHash=$(git log --pretty=format:'%h' -n 1)" -o output/lin/matterbridge-$VERSION-linux-amd64
39+
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -X github.com/${{ github.repository }}/version.GitHash=$(git log --pretty=format:'%h' -n 1)" -o output/win/matterbridge-$VERSION-windows-amd64.exe
40+
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -X github.com/${{ github.repository }}/version.GitHash=$(git log --pretty=format:'%h' -n 1)" -o output/mac/matterbridge-$VERSION-darwin-amd64
4141
- name: Upload linux 64-bit
4242
if: startsWith(matrix.go-version,'1.22')
43-
uses: actions/upload-artifact@v3
43+
uses: actions/upload-artifact@v4
4444
with:
4545
name: matterbridge-linux-64bit
4646
path: output/lin
4747
- name: Upload windows 64-bit
4848
if: startsWith(matrix.go-version,'1.22')
49-
uses: actions/upload-artifact@v3
49+
uses: actions/upload-artifact@v4
5050
with:
5151
name: matterbridge-windows-64bit
5252
path: output/win
5353
- name: Upload darwin 64-bit
5454
if: startsWith(matrix.go-version,'1.22')
55-
uses: actions/upload-artifact@v3
55+
uses: actions/upload-artifact@v4
5656
with:
5757
name: matterbridge-darwin-64bit
5858
path: output/mac

.github/workflows/docker.yml

Lines changed: 46 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,66 +3,58 @@ name: docker
33
on:
44
push:
55
branches:
6-
- 'master'
6+
- 'master'
77
tags:
8-
- 'v*'
8+
- 'v*'
99
pull_request:
1010
branches:
11-
- 'master'
11+
- 'master'
1212

1313
jobs:
1414
docker:
1515
runs-on: ubuntu-latest
1616
steps:
17-
-
18-
name: Checkout
19-
uses: actions/checkout@v2
20-
-
21-
name: Set up QEMU
22-
uses: docker/setup-qemu-action@v1
23-
with:
24-
platforms: amd64,arm64
25-
-
26-
name: Set up Docker Buildx
27-
uses: docker/setup-buildx-action@v1
28-
-
29-
name: Docker meta
30-
id: meta
31-
uses: docker/metadata-action@v3
32-
with:
33-
images: 42wim/matterbridge,ghcr.io/42wim/matterbridge
34-
flavor: |
35-
latest=true
36-
tags: |
37-
type=ref,event=branch
38-
type=ref,event=pr
39-
type=semver,pattern={{version}}
40-
type=semver,pattern=stable
41-
type=semver,pattern={{major}}
42-
type=semver,pattern={{major}}.{{minor}}
43-
-
44-
name: Login to DockerHub
45-
uses: docker/login-action@v1
46-
if: github.event_name != 'pull_request'
47-
with:
48-
username: ${{ secrets.DOCKERHUB_USERNAME }}
49-
password: ${{ secrets.DOCKERHUB_TOKEN }}
50-
-
51-
name: Log into registry ghcr.io
52-
uses: docker/login-action@v1
53-
if: github.event_name != 'pull_request'
54-
with:
55-
registry: ghcr.io
56-
username: ${{ github.repository_owner }}
57-
password: ${{ secrets.GITHUB_TOKEN }}
58-
-
59-
name: Build and push
60-
id: docker_build
61-
uses: docker/build-push-action@v2
62-
with:
63-
context: .
64-
platforms: linux/amd64,linux/arm64
65-
push: ${{ github.event_name != 'pull_request' }}
66-
tags: ${{ steps.meta.outputs.tags }}
67-
labels: ${{ steps.meta.outputs.labels }}
6817

18+
- name: Checkout
19+
uses: actions/checkout@v5
20+
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v3
23+
with:
24+
platforms: amd64,arm64
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Docker meta
30+
id: meta
31+
uses: docker/metadata-action@v5
32+
with:
33+
images: ghcr.io/${{ github.repository }}
34+
flavor: |
35+
latest=true
36+
tags: |
37+
type=ref,event=branch
38+
type=ref,event=pr
39+
type=semver,pattern={{version}}
40+
type=semver,pattern=stable
41+
type=semver,pattern={{major}}
42+
type=semver,pattern={{major}}.{{minor}}
43+
44+
- name: Log into registry ghcr.io
45+
uses: docker/login-action@v3
46+
if: github.event_name != 'pull_request'
47+
with:
48+
registry: ghcr.io
49+
username: ${{ github.repository_owner }}
50+
password: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Build and push
53+
id: docker_build
54+
uses: docker/build-push-action@v6
55+
with:
56+
context: .
57+
platforms: linux/amd64,linux/arm64
58+
push: ${{ github.event_name != 'pull_request' }}
59+
tags: ${{ steps.meta.outputs.tags }}
60+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)