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

Commit

Permalink
Specify the path to git (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon authored Mar 30, 2020
1 parent 3ef7917 commit ebf4723
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
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

0 comments on commit ebf4723

Please sign in to comment.