From 2c23d3a8d9db81a953b4eab4481f64b00283e50f Mon Sep 17 00:00:00 2001 From: Louis Royer Date: Thu, 16 May 2024 16:36:30 +0200 Subject: [PATCH] Update repository URL --- .github/dependabot.yml | 11 +++++++++++ .github/workflows/create-release.yml | 23 +++++++++++++++++++++++ .github/workflows/main.yml | 26 ++++++++++++++++++++++++++ .pre-commit-config.yaml | 8 ++++++++ go.mod | 4 ++-- 5 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/create-release.yml create mode 100644 .github/workflows/main.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3a72ea8 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..c696cbc --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,23 @@ +name: Release +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Get version number + id: version + run: echo "version=$(echo ${{ github.ref_name }} | cut -c2- -)" >> $GITHUB_OUTPUT + - name: Release + uses: ncipollo/release-action@v1 + with: + generateReleaseNotes: true + makeLatest: "legacy" + name: "Version ${{ steps.version.outputs.version }}" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1a4730c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,26 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "master" branch + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +jobs: + go_build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v5 + - name: Install depends + run: go get . + - name: Build + run: go build -v ./... diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..416533b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + - id: mixed-line-ending +exclude: ^.github/.*$ diff --git a/go.mod b/go.mod index 0e675cc..4bd58da 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ -module github.com/louisroyer/gopacket-gtp +module github.com/nextmn/gopacket-gtp -go 1.19 +go 1.21 require github.com/google/gopacket v1.1.19