From 86412dd25dbfca1d4865f6347538ed12904b7a2e Mon Sep 17 00:00:00 2001 From: Frostebite Date: Wed, 20 Apr 2022 17:51:32 +0100 Subject: [PATCH] per provider container defaults --- .../cloud-runner-self-hosted-ephemeral.yml | 124 ------------------ 1 file changed, 124 deletions(-) delete mode 100644 .github/workflows/cloud-runner-self-hosted-ephemeral.yml diff --git a/.github/workflows/cloud-runner-self-hosted-ephemeral.yml b/.github/workflows/cloud-runner-self-hosted-ephemeral.yml deleted file mode 100644 index dc22e963..00000000 --- a/.github/workflows/cloud-runner-self-hosted-ephemeral.yml +++ /dev/null @@ -1,124 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Cloud Runner - AWS Self-Hosted Ephemeral Runner Pipeline - -env: - AWS_REGION: eu-west-2 - AWS_DEFAULT_REGION: eu-west-2 - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - CLOUD_RUNNER_BRANCH: cloud-runner-develop - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - AWS_BASE_STACK_NAME: game-ci-github-pipelines - -# Controls when the workflow will run -on: - # Triggers the workflow on push or pull request events but only for the develop branch - push: { branches: [main, cloud-runner-develop] } - -jobs: - boot-self-hosted-runner: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - lfs: false - fetch-depth: 0 - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: eu-west-2 - - name: Unity - Builder - uses: ./ - with: - cloudRunnerCluster: aws - versioning: None - allowDirtyBuild: true - cloudRunnerMemory: 4096 - cloudRunnerCpu: 2048 - gitPrivateToken: ${{ secrets.GITHUB_TOKEN }} - customJob: | - - name: upload - image: ubuntu - commands: | - export DEBIAN_FRONTEND=noninteractive - export RUNNER_ALLOW_RUNASROOT="1" - apt-get update - apt-get install -qy unzip curl libdigest-sha-perl apt-transport-https libicu-dev jq git git-lfs - mkdir -p $BUILD_GUID/actions-runner && cd $BUILD_GUID/actions-runner - curl -o actions-runner-linux-x64-2.289.2.tar.gz -L https://github.com/actions/runner/releases/download/v2.289.2/actions-runner-linux-x64-2.289.2.tar.gz - echo "7ba89bb75397896a76e98197633c087a9499d4c1db7603f21910e135b0d0a238 actions-runner-linux-x64-2.289.2.tar.gz" | shasum -a 256 -c - tar xzf ./actions-runner-linux-x64-2.289.2.tar.gz - TOKEN=$(curl -X POST -H "Authorization: Bearer $GIT_PRIVATE_TOKEN" -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/game-ci/unity-builder/actions/runners/registration-token | jq -r '.token') - ./config.sh --url https://github.com/game-ci/unity-builder --token $TOKEN --ephemeral - echo $TOKEN - echo "cloud runner stop watching job" - ./run.sh - secrets: [] - boot-game-ci-cloud-runner: - runs-on: self-hosted - needs: boot-self-hosted-runner - steps: - - uses: actions/checkout@v2 - with: - lfs: false - fetch-depth: 0 - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: eu-west-2 - - name: Unity - Builder - id: aws-fargate-unity-build - # You may pin to the exact commit or the version. - # uses: game-ci/unity-builder@3d0eb0805bbe2df90e319abbe42e41d0b9105625 - uses: game-ci/unity-builder@cloud-runner-develop - with: - cloudRunnerCluster: aws - allowDirtyBuild: true - cloudRunnerMemory: 8192 - cloudRunnerCpu: 2048 - gitPrivateToken: ${{ secrets.GITHUB_TOKEN }} - targetPlatform: StandaloneWindows64 - versioning: None - postBuildSteps: | - - name: upload - image: amazon/aws-cli - commands: | - aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile default - aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile default - aws configure set region $AWS_DEFAULT_REGION --profile default - aws s3 ls - aws s3 ls game-ci-test-storage - du -s /data/cache/$CACHE_KEY - echo "build folder contents" - du -s /data/cache/$CACHE_KEY/build - find ~ -name '*exe' - aws s3 cp /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.zip s3://game-ci-test-storage/$CACHE_KEY/build-$BUILD_GUID.zip - secrets: - - name: awsAccessKeyId - value: ${{ secrets.AWS_ACCESS_KEY_ID }} - - name: awsSecretAccessKey - value: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: awsDefaultRegion - value: eu-west-2 - ########################### - # Download Artifacts # - ########################### - # download from cloud storage - - run: | - aws s3 cp s3://game-ci-test-storage/${{ steps.aws-fargate-unity-build.outputs.CACHE_KEY }}/build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.zip build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.zip - unzip build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.zip -d build - ls build - ########################### - # Upload # - ########################### - # download from cloud storage - - uses: actions/upload-artifact@v2 - with: - name: AWS Build (${{ matrix.targetPlatform }}) - path: build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.zip - retention-days: 14