diff --git a/.github/workflows/codebook-profile-build.yaml b/.github/workflows/codebook-profile-build-1.0.0.yaml similarity index 85% rename from .github/workflows/codebook-profile-build.yaml rename to .github/workflows/codebook-profile-build-1.0.0.yaml index 281941e..14899b4 100644 --- a/.github/workflows/codebook-profile-build.yaml +++ b/.github/workflows/codebook-profile-build-1.0.0.yaml @@ -14,9 +14,23 @@ on: workflow_version: required: true type: string + runner_timeout: + required: false + type: number + default: 180 secrets: RUNNER_PAT: required: true + RUNNER_REGION: + required: true + RUNNER_TYPE: + required: true + RUNNER_AMI_ID: + required: true + RUNNER_SUBNET_ID: + required: true + RUNNER_SG_ID: + required: true RUNNER_AWS_ACCESS_KEY_ID: required: true RUNNER_AWS_SECRET_ACCESS_KEY: @@ -34,11 +48,11 @@ on: jobs: start-runner: timeout-minutes: 5 # normally it only takes 1-2 minutes - name: Start self-hosted EC2 runner + name: Start self-hosted EC2 runner runs-on: ubuntu-latest permissions: - actions: write - steps: + actions: write + steps: - name: Start EC2 runner id: start-ec2-runner uses: NextChapterSoftware/ec2-action-builder@main @@ -46,12 +60,12 @@ jobs: github_token: ${{ secrets.RUNNER_PAT}} aws_access_key_id: ${{ secrets.RUNNER_AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.RUNNER_AWS_SECRET_ACCESS_KEY }} - aws_region: "us-east-2" - ec2_instance_type: t3a.medium - ec2_ami_id: ami-0172431f1b2be4fc6 - ec2_subnet_id: "subnet-0a602071414b8b2eb" - ec2_security_group_id: "sg-02810c38b0dcb2462" - ec2_instance_ttl: 60 # Optional (default is 60 minutes) + aws_region: ${{ secrets.RUNNER_REGION }} + ec2_instance_type: ${{ secrets.RUNNER_TYPE }} + ec2_ami_id: ${{ secrets.RUNNER_AMI_ID }} + ec2_subnet_id: ${{ secrets.RUNNER_SUBNET_ID }} + ec2_security_group_id: ${{ secrets.RUNNER_SG_ID }} + ec2_instance_ttl: ${{ inputs.runner_timeout }} # Optional (default is 60 minutes) ec2_spot_instance_strategy: BestEffort # Other options are: SpotOnly, BestEffort, MaxPerformance ec2_instance_tags: > [ diff --git a/.github/workflows/codebook-profile-build-caller.yaml b/.github/workflows/codebook-profile-build-caller.yaml index 00eff8d..3fb617e 100644 --- a/.github/workflows/codebook-profile-build-caller.yaml +++ b/.github/workflows/codebook-profile-build-caller.yaml @@ -32,7 +32,7 @@ jobs: workflow_version: ${{steps.get_version.outputs.workflow_version}} call_sciops_docker_image_debian: needs: [get_meta] - uses: ./.github/workflows/codebook-profile-build.yaml + uses: ./.github/workflows/codebook-profile-build-1.0.0.yaml # uses: yambottle/dj-sciops.github/.github/workflows/codebook-profile-build.yaml@main with: jhub_ver: ${{ inputs.jhub_ver }}