-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9b94df
commit aeb67b5
Showing
4 changed files
with
75 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build and test docker image | ||
on: | ||
pull_request: | ||
paths: | ||
- Dockerfile | ||
branches: | ||
- master | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build_docker_image: | ||
name: Build docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- run: sudo chown runner:docker /var/run/docker.sock | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
tags: oryd/sdk:${{ github.sha }} | ||
push: false | ||
outputs: type=docker,dest=./sdk.tar | ||
- name: upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: oryd-sdk-${{ github.sha }} | ||
path: ./sdk.tar | ||
- name: run generate.sh and test.sh | ||
run: | | ||
docker load --input ./sdk.tar | ||
rm ./sdk.tar | ||
docker run --mount type=bind,source="$(pwd)",target=/project -e FORCE_PROJECT=client -e FORCE_VERSION=$(cat ./spec/client/latest) -i oryd/sdk:${{ github.sha }} /bin/sh -c "cd /project && ./scripts/generate.sh && ./scripts/test.sh" |
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
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,27 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Check the platform architecture | ||
if [[ $(uname -m) == "x86_64" ]]; then | ||
# Download the x64 Dart SDK | ||
curl -L https://storage.googleapis.com/dart-archive/channels/stable/release/3.3.0/sdk/dartsdk-linux-x64-release.zip -o dart-sdk.zip | ||
# Add your installation steps here | ||
else | ||
# Download the ARM Dart SDK | ||
curl -L https://storage.googleapis.com/dart-archive/channels/stable/release/3.3.0/sdk/dartsdk-linux-arm64-release.zip -o dart-sdk.zip | ||
# Add your installation steps here | ||
fi | ||
|
||
# Unzip the downloaded file | ||
unzip dart-sdk.zip | ||
|
||
# Remove the downloaded file | ||
rm dart-sdk.zip | ||
|
||
mkdir -p /usr/lib/dart | ||
# Move the Dart SDK to the /usr/lib/dart directory | ||
mv -v dart-sdk/* /usr/lib/dart | ||
|
||
# Add the Dart SDK to the PATH | ||
echo 'export PATH="$PATH:/usr/lib/dart/bin"' >> ~/.bashrc |