Skip to content

Commit

Permalink
Workflow update (#775)
Browse files Browse the repository at this point in the history
* workflow updates

* release test fixes
  • Loading branch information
ehsandeep authored Aug 18, 2023
1 parent a5912e7 commit 91797c5
Show file tree
Hide file tree
Showing 9 changed files with 148 additions and 27 deletions.
47 changes: 24 additions & 23 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,39 @@
version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "dev"
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"

# Maintain dependencies for go modules
- package-ecosystem: "gomod"
directory: "v2/"
schedule:
interval: "daily"
interval: "weekly"
target-branch: "dev"
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"

# Maintain dependencies for docker
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
target-branch: "dev"
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"
# # Maintain dependencies for docker
# - package-ecosystem: "docker"
# directory: "/"
# schedule:
# interval: "weekly"
# target-branch: "dev"
# commit-message:
# prefix: "chore"
# include: "scope"
# labels:
# - "Type: Maintenance"
#
# # Maintain dependencies for GitHub Actions
# - package-ecosystem: "github-actions"
# directory: "/"
# schedule:
# interval: "weekly"
# target-branch: "dev"
# commit-message:
# prefix: "chore"
# include: "scope"
# labels:
# - "Type: Maintenance"
17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
exclude:
authors:
- dependabot
categories:
- title: 🎉 New Features
labels:
- "Type: Enhancement"
- title: 🐞 Bugs Fixes
labels:
- "Type: Bug"
- title: 🔨 Maintenance
labels:
- "Type: Maintenance"
- title: Other Changes
labels:
- "*"
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest-16-cores
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/dep-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 🤖 dep auto merge

on:
pull_request:
branches:
- dev
workflow_dispatch:

permissions:
pull-requests: write
issues: write
repository-projects: write

jobs:
automerge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.DEPENDABOT_PAT }}

- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
github-token: ${{ secrets.DEPENDABOT_PAT }}
target: all
2 changes: 1 addition & 1 deletion .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest-16-cores] # Todo: windows-latest, macOS-latest
os: [ubuntu-latest] # Todo: windows-latest, macOS-latest

steps:
- name: Set up Go
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: 🔨 Release Test

on:
pull_request:
paths:
- '**.go'
- '**.mod'
workflow_dispatch:

jobs:
release-test-mac:
runs-on: macos-latest
steps:
- name: "Check out code"
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x

- name: Install Dependences
run: brew install libpcap

- name: release test
uses: goreleaser/goreleaser-action@v4
with:
args: "release --clean --snapshot -f .goreleaser/mac.yml"
version: latest
workdir: v2

release-test-linux:
runs-on: ubuntu-latest-16-cores
steps:
- name: "Check out code"
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x

- name: Install Dependences
run: sudo apt install libpcap-dev

- name: release test
uses: goreleaser/goreleaser-action@v4
with:
args: "release --clean --snapshot -f .goreleaser/linux.yml"
version: latest
workdir: v2

release-test-windows:
runs-on: windows-latest-8-cores
steps:
- name: "Check out code"
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x

- name: release test
uses: goreleaser/goreleaser-action@v4
with:
args: "release --clean --snapshot -f .goreleaser/windows.yml"
version: latest
workdir: v2
1 change: 1 addition & 0 deletions v2/.goreleaser/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ builds:
- arm64
archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}_{{ .Arch }}'

checksum:
name_template: "{{ .ProjectName }}-linux-checksums.txt"
Expand Down
4 changes: 2 additions & 2 deletions v2/.goreleaser/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ builds:
- arm64
archives:
- format: zip
replacements:
darwin: macOS
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}_{{ .Arch }}'


checksum:
name_template: "{{ .ProjectName }}-mac-checksums.txt"
1 change: 1 addition & 0 deletions v2/.goreleaser/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ builds:
- 386
archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}_{{ .Arch }}'

checksum:
name_template: "{{ .ProjectName }}-windows-checksums.txt"

0 comments on commit 91797c5

Please sign in to comment.