From 6bd18534ee01632c81c1f0f4a1842344767f02f1 Mon Sep 17 00:00:00 2001 From: Tanner Doshier Date: Thu, 26 Dec 2024 11:24:16 -0500 Subject: [PATCH] Configure git in GH Actions tests Could set GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL env vars ultimately? But I don't have admin access for the repo yet. --- .github/actions/configure-git/action.yml | 10 ++++++++++ .github/workflows/ci-nix.yml | 1 + .github/workflows/ci-pipx.yml | 1 + 3 files changed, 12 insertions(+) create mode 100644 .github/actions/configure-git/action.yml diff --git a/.github/actions/configure-git/action.yml b/.github/actions/configure-git/action.yml new file mode 100644 index 0000000..3ffed48 --- /dev/null +++ b/.github/actions/configure-git/action.yml @@ -0,0 +1,10 @@ +name: "Configure git" +description: "Configure basic things to enable git usage in a GitHub Action" +runs: + using: "composite" + steps: + - name: Configure git + shell: bash + run: | + git config --global user.name nava-platform-bot + git config --global user.email platform-admins@navapbc.com diff --git a/.github/workflows/ci-nix.yml b/.github/workflows/ci-nix.yml index 6403e73..379ffeb 100644 --- a/.github/workflows/ci-nix.yml +++ b/.github/workflows/ci-nix.yml @@ -45,6 +45,7 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: ./.github/actions/configure-git - uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/magic-nix-cache-action@main diff --git a/.github/workflows/ci-pipx.yml b/.github/workflows/ci-pipx.yml index 386cd08..14aef4b 100644 --- a/.github/workflows/ci-pipx.yml +++ b/.github/workflows/ci-pipx.yml @@ -32,6 +32,7 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: ./.github/actions/configure-git - uses: actions/setup-python@v5 with: python-version: "3.13"