Merge bitcoin-core/secp256k1#1411: ci: Make repetitive command the default one

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

Pull request description:

  This PR addresses the https://github.com/bitcoin-core/secp256k1/pull/1409#discussion_r1301767281:
  > couldn't we add this to `run-in-docker-action` to avoid duplication?

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

Tree-SHA512: 793cec3d99853a23e06680fe35a7cae2dc8771f22e3940c4a4f36357273164f2d92e196768118d146e956ffca9ef59d4e5f86e1cba5576ebfdc59343581c9924
This commit is contained in:
Tim Ruffing 2023-08-24 10:45:57 +02:00
commit ea26b71c3a
No known key found for this signature in database
GPG Key ID: 8C461CCD293F6011
2 changed files with 6 additions and 35 deletions

View File

@ -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:
@ -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

View File

@ -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() }}
@ -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() }}
@ -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() }}
@ -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() }}
@ -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() }}
@ -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() }}
@ -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() }}
@ -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() }}
@ -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() }}
@ -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() }}
@ -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() }}