diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1c927b..e28a4a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,10 @@ on: push: branches: [main] pull_request_target: + workflow_dispatch: jobs: - build: + ci: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -15,5 +16,5 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.11" - - name: make test - run: make test + - name: Test + run: make -B test diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index dfa6d0d..495e83d 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -7,9 +7,10 @@ on: permissions: contents: write + actions: write jobs: - build: + snapshot: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -22,11 +23,16 @@ jobs: run: | git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - name: make snapshot - run: make snapshot + - name: Snapshot + run: make -B snapshot - name: Commit and push any changes + env: + GH_TOKEN: ${{ github.token }} run: | git add . - if git commit -m "chore: make snapshot"; then + if git commit -m "chore: update snapshot"; then git push + # git push won't trigger workflows so we manually do it + # see https://github.com/orgs/community/discussions/25702#discussioncomment-8650283 + gh workflow run ci.yml fi diff --git a/snapshot/my-repo b/snapshot/my-repo deleted file mode 100644 index e69de29..0000000 diff --git a/{{cookiecutter.repo_name}}/pyproject.toml b/{{cookiecutter.repo_name}}/pyproject.toml index deb6cbf..67e146c 100644 --- a/{{cookiecutter.repo_name}}/pyproject.toml +++ b/{{cookiecutter.repo_name}}/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "{{cookiecutter.project_name}}" description = "{{cookiecutter.description}}" -version = "0.0.1" +version = "0.0.0" readme = "README.md" requires-python = ">=3.11" dependencies = []