forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin-core/secp256k1#1398: ci, gha: Add Windows jobs based on…
… Linux image 87d35f3 ci: Rename `cirrus.sh` to more general `ci.sh` (Hennadii Stepanov) d6281dd ci: Remove Windows tasks from Cirrus CI (Hennadii Stepanov) 2b6f9cd ci, gha: Add Windows jobs based on Linux image (Hennadii Stepanov) Pull request description: ACKs for top commit: real-or-random: ACK 87d35f3 jonasnick: ACK 87d35f3 Tree-SHA512: bab005041692f52ed26899d50ee9114e6dd57a21ffa36b4d0b99e8b5b394a64a956cbc99ae2767fdf64f242970ebbeb0df4f5b373e059ecb187174f471b1a95e
- Loading branch information
Showing
4 changed files
with
123 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: 'Run in Docker with environment' | ||
description: 'Run a command in a Docker container, while passing explicitly set environment variables into the container.' | ||
inputs: | ||
dockerfile: | ||
description: 'A Dockerfile that defines an image' | ||
required: true | ||
tag: | ||
description: 'A tag of an image' | ||
required: true | ||
command: | ||
description: 'A command to run in a container' | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: docker/setup-buildx-action@v2 | ||
with: | ||
# See: https://github.com/moby/buildkit/issues/3969. | ||
driver-opts: | | ||
network=host | ||
- uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: ${{ inputs.dockerfile }} | ||
tags: ${{ inputs.tag }} | ||
load: true | ||
cache-from: type=gha | ||
|
||
- # Tell Docker to pass environment variables in `env` into the container. | ||
run: > | ||
docker run \ | ||
$(echo '${{ toJSON(env) }}' | jq -r 'keys[] | "--env \(.) "') \ | ||
--volume ${{ github.workspace }}:${{ github.workspace }} \ | ||
--workdir ${{ github.workspace }} \ | ||
${{ inputs.tag }} bash -c "${{ inputs.command }}" | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.