Skip to content

Commit 36701f2

Browse files
authored
ci: configure ci (#54)
1 parent ffd7390 commit 36701f2

File tree

5 files changed

+54
-4
lines changed

5 files changed

+54
-4
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @ymgyt

.github/dependabot.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ updates:
33
- package-ecosystem: github-actions
44
directory: /
55
schedule:
6-
interval: monthly
7-
6+
interval: weekly
87
- package-ecosystem: cargo
98
directory: /
109
schedule:
11-
interval: monthly
10+
interval: weekly

.github/workflows/ci.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ name: CI
22
on:
33
workflow_dispatch:
44
pull_request:
5+
types: [opened, synchronize, reopened]
56
push:
7+
branches:
8+
- main
69
paths:
710
- '**.rs'
811
- rust-toolchain.toml
@@ -11,6 +14,7 @@ on:
1114
jobs:
1215
tests:
1316
runs-on: ubuntu-latest
17+
timeout-minutes: 60
1418
steps:
1519
- uses: actions/checkout@v4
1620
- uses: cachix/install-nix-action@V27
@@ -28,3 +32,21 @@ jobs:
2832
with:
2933
token: ${{ secrets.CODECOV_TOKEN }}
3034
files: result
35+
dependabot-auto-merge:
36+
if: ${{ github.actor == 'dependabot[bot]' }}
37+
runs-on: ubuntu-latest
38+
needs: [tests]
39+
permissions:
40+
contents: write
41+
pull-requests: write
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
steps:
45+
- uses: actions/checkout@v4
46+
- id: meta
47+
uses: dependabot/fetch-metadata@v2
48+
# merge this PR if update is a semver patch
49+
- if: ${{ steps.meta.outputs.update-type == 'version-update:semver-patch' }}
50+
run: |
51+
gh pr review "${GITHUB_HEAD_REF}" --approve
52+
gh pr merge "${GITHUB_HEAD_REF}" --squash --auto

.github/workflows/release_image.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish docker image
1+
name: Container
22
on:
33
workflow_dispatch:
44
inputs:
@@ -11,6 +11,7 @@ on:
1111
- '*-v[0-9]+.[0-9]+.[0-9]+*'
1212
jobs:
1313
publish-synd-api-image:
14+
timeout-minutes: 60
1415
runs-on: ubuntu-latest
1516
steps:
1617
- uses: actions/checkout@v4

docs/ci.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# CI
2+
3+
## GitHub Actions
4+
5+
### Secrets
6+
7+
| Secret | Usage | GeneratedAt | ManagedBy |
8+
| --- | --- | --- | --- |
9+
| `CACHIX_AUTH_TOKEN` | Read and Write cachix cache | [cachix](https://app.cachix.org/personal-auth-tokens) | @ymgyt |
10+
| `CODECOV_TOKEN` | Upload test coverage to codecov | [codecov](https://app.codecov.io/gh/ymgyt/syndicationd/settings) | @ymgyt |
11+
| `HOMEBREW_TAP_TOKEN` | Push to [homebrew repo](https://github.com/ymgyt/homebrew-syndicationd/tree/main) by cargo-dist | [github](https://github.com/settings/tokens) | @ymgyt |
12+
| `NPM_TOKEN` | Push to [npm registry](https://www.npmjs.com/settings/syndicationd/packages) by cargo-dist | [npm](https://www.npmjs.com/settings/ymgyt/tokens) | @ymgyt |
13+
14+
15+
#### `HOMEBREW_TAP_TOKEN`
16+
17+
* [cargo-dist doc](https://opensource.axo.dev/cargo-dist/book/installers/homebrew.html)
18+
* `repo` scope is required
19+
20+
#### `NPM_TOKEN`
21+
22+
* [cargo-dist doc](https://opensource.axo.dev/cargo-dist/book/installers/npm.html)
23+
* Packages and scopes: Read and write
24+
* Select packages: All packages (NOTE: because the package does not yet exist, you must pick this. However, you can (and probably should!) update this to scope the token to a single package after publish. This is sadly a limitation of the npm token system.)
25+
* Organizations: No access
26+
27+

0 commit comments

Comments
 (0)