Skip to content

Commit 6d1cf76

Browse files
committed
Enable CI/CD: dependabot.yml + tag-and-release
1 parent 20839df commit 6d1cf76

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: github-actions
8+
directory: /
9+
schedule:
10+
interval: weekly

.github/workflows/tests.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
name: tests
1+
name: ci/cd
22

3-
on: [ push ]
3+
on:
4+
push:
5+
# only on branch pushes
6+
branches: [ '**' ]
7+
tags-ignore: [ '**' ]
48

59
jobs:
610

@@ -31,7 +35,7 @@ jobs:
3135
uses: actions/checkout@v4
3236
with:
3337
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # fyi, dependabot can't access normal secrets
34-
ref: ${{ github.sha }} # lock to triggered commit (github.ref is dynamic)
38+
ref: ${{ github.ref }} # dont lock to sha (action needs to push)
3539
- if: github.actor != 'dependabot[bot]'
3640
name: format and push
3741
run: |
@@ -70,3 +74,24 @@ jobs:
7074
run: |
7175
set -euo pipefail; echo "now: $(date -u +"%Y-%m-%dT%H:%M:%S.%3N")"
7276
pytest . -vvv --maxfail=1
77+
78+
79+
############################################################################
80+
# TAG + RELEASE
81+
#############################################################################
82+
83+
tag-and-release:
84+
# only run on main/default
85+
if: format('refs/heads/{0}', github.event.repository.default_branch) == github.ref
86+
needs: [
87+
mypy,
88+
flake8,
89+
code-format,
90+
test,
91+
]
92+
uses: WIPACrepo/wipac-dev-workflows/.github/workflows/tag-and-release.yml@main # main -> dogfooding
93+
permissions: # for GITHUB_TOKEN
94+
contents: write
95+
with:
96+
project-type: gha-package
97+
version-style: 'X.Y'

0 commit comments

Comments
 (0)