Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Specify the path to git #10

Merged
merged 1 commit into from
Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Specify the path to git
  • Loading branch information
brettcannon committed Mar 30, 2020
commit 7885c60a9f035f019eafeb4466f99bfe92b118ec
8 changes: 2 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ jobs:

- run: black --check .

env:
EVENT_NAME: ${{ github.event_name }}
REF: ${{ github.ref }}
ACTION: ${{ github.event.action }}
MERGED: ${{ github.event.pull_request.merged }}


release:
needs: [test]
Expand All @@ -56,6 +50,8 @@ jobs:
steps:
- uses: actions/checkout@v2

- run: which git

- uses: brettcannon/release-often@master
with:
changelog-path: CHANGES.md
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ COPY poetry.lock .
RUN python -m pip install poetry
RUN poetry config virtualenvs.create false
RUN poetry install --no-interaction --no-ansi --no-dev
# Suppress warnings from pip via pep517 trying to cache wheels
RUN chmod 0666 /github/home/.cache/pip

ADD release_often .

Expand Down
12 changes: 9 additions & 3 deletions release_often/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import os
import pathlib
import subprocess
import sys
Expand Down Expand Up @@ -56,13 +57,18 @@ def build():


def commit(new_version):
os.chdir(actions.workspace())
subprocess.run(
["git", "config", "--local", "user.email", "action@github.com"], check=True
["/usr/bin/git", "config", "--local", "user.email", "action@github.com"],
check=True,
)
subprocess.run(
["git", "config", "--local", "user.name", "GitHub Action"], check=True
["/usr/bin/git", "config", "--local", "user.name", "GitHub Action"], check=True
)
subprocess.run(
["/usr/bin/git", "commit", "-a", "-m", f"Updates for v{new_version}"],
check=True,
)
subprocess.run(["git", "commit", "-a", "-m", f"Updates for v{new_version}"])


if __name__ == "__main__":
Expand Down