Skip to content

Commit

Permalink
update dependacy
Browse files Browse the repository at this point in the history
  • Loading branch information
fredga committed Oct 19, 2021
1 parent 2a40635 commit 5dbde72
Show file tree
Hide file tree
Showing 169 changed files with 9,026 additions and 7,878 deletions.
3 changes: 3 additions & 0 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- match:
dependency_type: all
update_type: "semver:minor"
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
57 changes: 57 additions & 0 deletions .github/workflows/after-merge-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: after-merge-dependabot

on:
pull_request_target:
types: [closed]

jobs:
check:
if: github.event.pull_request.merged && github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
concurrency:
group: dependabot-after-merge
cancel-in-progress: true
steps:
- name: Fetch dependabot metadata
id: dependabot-metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- uses: oprypin/find-latest-tag@v1
id: octokit
with:
repository: ${{ github.repository }}
prefix: v

- name: Parse last release
id: semver_parser
uses: booxmedialtd/ws-action-parse-semver@v1
with:
input_string: '${{ steps.octokit.outputs.tag }}'
version_extractor_regex: 'v(.*)$'

- name: Compute tag
id: compte_tag
run: |
major=${{ steps.semver_parser.outputs.major }}
minor=${{ steps.semver_parser.outputs.minor }}
patch=${{ steps.semver_parser.outputs.patch }}
if [ "${{ steps.dependabot-metadata.outputs.update-type }}" == "version-update:semver-minor" ]; then
minor=$((minor+1))
patch=0
echo "::warning::bumping minor version"
elif [ "${{ steps.dependabot-metadata.outputs.update-type }}" == "version-update:semver-patch" ]; then
patch=$((patch+1))
echo "::warning::bumping patch version"
fi
tag="v${major}.${minor}.${patch}"
echo "::set-output name=tag::${tag}"
echo "::warning::tag == ${tag}"
- name: Create tag
uses: tvdias/[email protected]
if: steps.compte_tag.outputs.tag != steps.semver_parser.outputs.fullversion
with:
repo-token: "${{ secrets.AUTO_MERGE_TOKEN }}"
tag: "${{ steps.compte_tag.outputs.tag }}"
20 changes: 20 additions & 0 deletions .github/workflows/auto-accept-dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: auto-accept-dependabot

on:
pull_request_target:

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
config: .github/auto-merge.yml
command: "squash and merge"
github-token: ${{ secrets.AUTO_MERGE_TOKEN }}
26 changes: 0 additions & 26 deletions .github/workflows/autoupdate.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-and-release
name: goreleaser

on:
push:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: set up go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.17

- name: cache go modules
uses: actions/cache@v1
Expand Down Expand Up @@ -58,3 +58,4 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USER: github-actions
30 changes: 30 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: unit-tests

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: set up go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: cache go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: tests
run: |
go test -v ./...
26 changes: 9 additions & 17 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
project_name: gomod_exporter

builds:
-
&template
id: pusher
dir: pusher
- id: binary
binary: gomod_pusher
dir: .
env:
- CGO_ENABLED=0
ldflags:
Expand All @@ -21,11 +19,6 @@ builds:
- darwin
goarch:
- amd64
-
<<: *template
id: exporter
dir: exporter
binary: gomod_exporter

archives:
- id: archives
Expand All @@ -35,14 +28,13 @@ archives:
format: "tar.gz"
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
wrap_in_directory: true
files:
- LICENSE*
- README*
- CHANGELOG*
- docs/*
- assets/*
- static/*
- templates/*
- id: archives-zip
builds:
- pusher
- exporter
format: "zip"
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
wrap_in_directory: true

checksum:
name_template: checksums.txt
Expand Down
42 changes: 28 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,26 +1,40 @@
module github.com/orange-cloudfoundry/gomod_exporter

go 1.15
go 1.17

require (
github.com/Microsoft/go-winio v0.5.0 // indirect
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/gorilla/mux v1.8.0
github.com/kevinburke/ssh_config v1.1.0 // indirect
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/common v0.29.0
github.com/prometheus/procfs v0.7.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/prometheus/common v0.31.1
github.com/sirupsen/logrus v1.8.1
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e // indirect
golang.org/x/mod v0.4.2
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
google.golang.org/protobuf v1.27.1 // indirect
golang.org/x/mod v0.5.1
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/src-d/go-git.v4 v4.13.1
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
)

require (
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.1.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/xanzy/ssh-agent v0.3.1 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/sys v0.0.0-20211015200801-69063c4bb744 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)
Loading

0 comments on commit 5dbde72

Please sign in to comment.