Skip to content

chore(deps): Bump golang.org/x/oauth2 from 0.15.0 to 0.30.0 (#7) #18

chore(deps): Bump golang.org/x/oauth2 from 0.15.0 to 0.30.0 (#7)

chore(deps): Bump golang.org/x/oauth2 from 0.15.0 to 0.30.0 (#7) #18

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
cache: true
- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
sh -s -- -b $(go env GOPATH)/bin v1.55.2
- name: Run golangci-lint
run: golangci-lint run ./...
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
cache: true
- name: Run tests
run: |
go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage
uses: codecov/codecov-action@v5
with:
file: ./coverage.txt
flags: unittests
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
os: [linux, darwin, windows]
arch: [amd64, arm64]
exclude:
- os: windows
arch: arm64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
cache: true
- name: Build binary
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: |
output="dependabot-sync-${{ matrix.os }}-${{ matrix.arch }}"
if [ "${{ matrix.os }}" = "windows" ]; then
output="${output}.exe"
fi
go build -ldflags="-w -s -X main.Version=$(git describe --tags --always)" \
-o "bin/${output}" ./cmd/dependabot-sync
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: binaries
path: bin/
validate-configs:
name: Validate Configuration Templates
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate YAML files
run: |
for file in configs/**/*.yml configs/**/*.yaml; do
if [ -f "$file" ]; then
echo "Validating $file"
python -c "import yaml, sys; yaml.safe_load(open('$file'))" || exit 1
fi
done
- name: Check Dependabot schema compliance
run: |
# Install yq for YAML processing
wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
chmod +x /usr/local/bin/yq
# Validate required fields
for file in configs/*/default.yml; do
if [ -f "$file" ]; then
echo "Checking $file for required fields"
yq eval '.version' "$file" > /dev/null || (echo "Missing version field in $file" && exit 1)
yq eval '.updates' "$file" > /dev/null || (echo "Missing updates field in $file" && exit 1)
fi
done
docker:
name: Docker Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./deployments/docker/Dockerfile
push: false
tags: |
dependabot-config-manager:latest
dependabot-config-manager:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max