Skip to content

Commit

Permalink
Merge bitcoin-core/secp256k1#1411: ci: Make repetitive command the de…
Browse files Browse the repository at this point in the history
…fault one

cce0456 ci: Make repetitive command the default one (Hennadii Stepanov)
317a4c4 ci: Move `git config ...` to `run-in-docker-action` (Hennadii Stepanov)

Pull request description:

  This PR addresses the bitcoin-core/secp256k1#1409 (comment):
  > couldn't we add this to `run-in-docker-action` to avoid duplication?

ACKs for top commit:
  real-or-random:
    ACK cce0456

Tree-SHA512: 793cec3d99853a23e06680fe35a7cae2dc8771f22e3940c4a4f36357273164f2d92e196768118d146e956ffca9ef59d4e5f86e1cba5576ebfdc59343581c9924
  • Loading branch information
real-or-random committed Aug 24, 2023
2 parents 4d7fe60 + cce0456 commit ea26b71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 35 deletions.
8 changes: 6 additions & 2 deletions .github/actions/run-in-docker-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ inputs:
required: true
command:
description: 'A command to run in a container'
required: true
required: false
default: ./ci/ci.sh
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -41,5 +42,8 @@ runs:
$(echo '${{ toJSON(env) }}' | jq -r 'keys[] | "--env \(.) "') \
--volume ${{ github.workspace }}:${{ github.workspace }} \
--workdir ${{ github.workspace }} \
${{ inputs.tag }} bash -c "${{ inputs.command }}"
${{ inputs.tag }} bash -c "
git config --global --add safe.directory ${{ github.workspace }}
${{ inputs.command }}
"
shell: bash
33 changes: 0 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ jobs:
with:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image
command: >
git config --global --add safe.directory ${{ github.workspace }} &&
./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
Expand Down Expand Up @@ -155,9 +152,6 @@ jobs:
with:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image
command: >
git config --global --add safe.directory ${{ github.workspace }} &&
./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
Expand Down Expand Up @@ -202,9 +196,6 @@ jobs:
with:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image
command: >
git config --global --add safe.directory ${{ github.workspace }} &&
./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
Expand Down Expand Up @@ -257,9 +248,6 @@ jobs:
with:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image
command: >
git config --global --add safe.directory ${{ github.workspace }} &&
./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
Expand Down Expand Up @@ -304,9 +292,6 @@ jobs:
with:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image
command: >
git config --global --add safe.directory ${{ github.workspace }} &&
./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
Expand Down Expand Up @@ -351,9 +336,6 @@ jobs:
with:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image
command: >
git config --global --add safe.directory ${{ github.workspace }} &&
./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
Expand Down Expand Up @@ -408,9 +390,6 @@ jobs:
with:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image
command: >
git config --global --add safe.directory ${{ github.workspace }} &&
./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
Expand Down Expand Up @@ -466,9 +445,6 @@ jobs:
with:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image
command: >
git config --global --add safe.directory ${{ github.workspace }} &&
./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
Expand Down Expand Up @@ -525,9 +501,6 @@ jobs:
with:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image
command: >
git config --global --add safe.directory ${{ github.workspace }} &&
./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
Expand Down Expand Up @@ -582,9 +555,6 @@ jobs:
with:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image
command: >
git config --global --add safe.directory ${{ github.workspace }} &&
./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
Expand Down Expand Up @@ -746,9 +716,6 @@ jobs:
with:
dockerfile: ./ci/linux-debian.Dockerfile
tag: linux-debian-image
command: >
git config --global --add safe.directory ${{ github.workspace }} &&
./ci/ci.sh

- run: cat tests.log || true
if: ${{ always() }}
Expand Down

0 comments on commit ea26b71

Please sign in to comment.