Skip to content

Commit

Permalink
ci: fix CI issues, add dependabot (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisBrunner authored Nov 25, 2024
1 parent 96d4d14 commit 7dfa9ed
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 117 deletions.
29 changes: 29 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: /
schedule:
interval: weekly
groups:
actions-deps:
patterns:
- "*"

- package-ecosystem: gomod
directory: /
schedule:
interval: monthly
groups:
security-updates:
applies-to: security-updates
patterns:
- "*"
major-updates:
applies-to: version-updates
update-types:
- "major"
minor-updates:
applies-to: version-updates
update-types:
- "minor"
- "patch"
112 changes: 56 additions & 56 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ jobs:
os: [ubuntu-latest]

steps:
- name: Install Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2
- name: Cache go.mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Vet
run: go vet ./...
- name: Test
run: go test -v ./...
- name: Build
run: go build -v ./...
- name: Install Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2
- name: Cache go.mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Vet
run: go vet ./...
- name: Test
run: go test -v ./...
- name: Build
run: go build -v ./...

build:
runs-on: ubuntu-latest
Expand All @@ -39,43 +39,43 @@ jobs:
strategy:
matrix:
include:
- label: armv5
arch: arm
arm: 5
- label: armv6
arch: arm
arm: 6
- label: armv7
arch: arm
arm: 7
- label: arm64
arch: arm64
- label: amd64
arch: amd64
- label: i386
arch: 386
- label: armv5
arch: arm
arm: 5
- label: armv6
arch: arm
arm: 6
- label: armv7
arch: arm
arm: 7
- label: arm64
arch: arm64
- label: amd64
arch: amd64
- label: i386
arch: 386

steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- uses: actions/checkout@v2
- name: Cache go.mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: go build -v ./...
env:
GOOS: linux
GOARCH: ${{ matrix.arch }}
GOARM: ${{ matrix.arm }}
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: avahi2dns-linux-${{ matrix.label }}
path: avahi2dns
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- uses: actions/checkout@v2
- name: Cache go.mod
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: go build -v ./...
env:
GOOS: linux
GOARCH: ${{ matrix.arch }}
GOARM: ${{ matrix.arm }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: avahi2dns-linux-${{ matrix.label }}
path: avahi2dns
28 changes: 28 additions & 0 deletions .github/workflows/lint-gha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint Github Actions

on:
push:
branches: [main]
paths:
- ".github/**"
pull_request:
paths:
- ".github/**"

jobs:
lint:
name: Lint YAML files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: .github
config_data: |
extends: default
rules:
line-length:
max: 120
level: warning
document-start: disable
truthy: disable
122 changes: 61 additions & 61 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,70 +3,70 @@ name: Release
on:
release:
types:
- created
- created

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Download all workflow artifacts
uses: dawidd6/action-download-artifact@v6
with:
workflow: build.yml
branch: ${{ github.event.release.target_commitish }}
# FIXME: I hate this
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-armv5/avahi2dns
asset_name: avahi2dns-linux-armv5
asset_content_type: binary/octet-stream
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-armv6/avahi2dns
asset_name: avahi2dns-linux-armv6
asset_content_type: binary/octet-stream
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-armv7/avahi2dns
asset_name: avahi2dns-linux-armv7
asset_content_type: binary/octet-stream
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-arm64/avahi2dns
asset_name: avahi2dns-linux-arm64
asset_content_type: binary/octet-stream
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-amd64/avahi2dns
asset_name: avahi2dns-linux-amd64
asset_content_type: binary/octet-stream
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-i386/avahi2dns
asset_name: avahi2dns-linux-i386
asset_content_type: binary/octet-stream
- name: Download all workflow artifacts
uses: dawidd6/action-download-artifact@v6
with:
workflow: build.yml
branch: ${{ github.event.release.target_commitish }}
# FIXME: I hate this
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-armv5/avahi2dns
asset_name: avahi2dns-linux-armv5
asset_content_type: binary/octet-stream
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-armv6/avahi2dns
asset_name: avahi2dns-linux-armv6
asset_content_type: binary/octet-stream
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-armv7/avahi2dns
asset_name: avahi2dns-linux-armv7
asset_content_type: binary/octet-stream
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-arm64/avahi2dns
asset_name: avahi2dns-linux-arm64
asset_content_type: binary/octet-stream
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-amd64/avahi2dns
asset_name: avahi2dns-linux-amd64
asset_content_type: binary/octet-stream
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: avahi2dns-linux-i386/avahi2dns
asset_name: avahi2dns-linux-i386
asset_content_type: binary/octet-stream

0 comments on commit 7dfa9ed

Please sign in to comment.