-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor start into a reusable workflow.
- Loading branch information
Showing
7 changed files
with
150 additions
and
59 deletions.
There are no files selected for viewing
File renamed without changes.
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,62 @@ | ||
# This file was autogenerated by uv via the following command: | ||
# uv pip compile requirements.in --python-version 3.9 --python-platform linux --no-build | ||
certifi==2024.6.2 | ||
# via requests | ||
cffi==1.16.0 | ||
# via cryptography | ||
charset-normalizer==3.3.2 | ||
# via requests | ||
cryptography==42.0.8 | ||
# via openstacksdk | ||
decorator==5.1.1 | ||
# via | ||
# dogpile-cache | ||
# openstacksdk | ||
dogpile-cache==1.3.3 | ||
# via openstacksdk | ||
idna==3.7 | ||
# via requests | ||
iso8601==2.1.0 | ||
# via | ||
# keystoneauth1 | ||
# openstacksdk | ||
jmespath==1.0.1 | ||
# via openstacksdk | ||
jsonpatch==1.33 | ||
# via openstacksdk | ||
jsonpointer==2.4 | ||
# via jsonpatch | ||
keystoneauth1==5.6.0 | ||
# via openstacksdk | ||
netifaces==0.11.0 | ||
# via openstacksdk | ||
openstacksdk==3.1.0 | ||
# via -r requirements.in | ||
os-service-types==1.7.0 | ||
# via | ||
# keystoneauth1 | ||
# openstacksdk | ||
pbr==6.0.0 | ||
# via | ||
# keystoneauth1 | ||
# openstacksdk | ||
# os-service-types | ||
# stevedore | ||
platformdirs==4.2.2 | ||
# via openstacksdk | ||
pycparser==2.22 | ||
# via cffi | ||
pyyaml==6.0.1 | ||
# via openstacksdk | ||
requests==2.32.3 | ||
# via keystoneauth1 | ||
requestsexceptions==1.4.0 | ||
# via openstacksdk | ||
stevedore==5.2.0 | ||
# via | ||
# dogpile-cache | ||
# keystoneauth1 | ||
typing-extensions==4.12.1 | ||
# via dogpile-cache | ||
urllib3==2.2.1 | ||
# via requests |
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,56 @@ | ||
name: Start | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
number: | ||
description: 'Number of runners to start.' | ||
required: false | ||
default: -1 | ||
type: number | ||
|
||
secrets: | ||
OS_APPLICATION_CREDENTIAL_ID: | ||
required: true | ||
OS_APPLICATION_CREDENTIAL_SECRET: | ||
required: true | ||
|
||
outputs: | ||
exit_code: | ||
description: "The exit code from start.py" | ||
value: ${{ jobs.action_runners.outputs.exit_code }} | ||
|
||
jobs: | ||
action_runners: | ||
name: action runners | ||
runs-on: ubuntu-latest | ||
outputs: | ||
exit_code: ${{ steps.start.outputs.exit_code }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
repository: glotzerlab/jetstream2-admin | ||
ref: ${{ github.workflow_sha }} | ||
# Python 3.9 is the latest possible because netifaces has no new releases | ||
- name: Set up Python | ||
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | ||
with: | ||
python-version: "3.9" | ||
- name: Install openstack | ||
uses: glotzerlab/workflows/setup-uv@5cfac9da9cb78e16ae97a9119b6fd13c1c2d6f5e # 0.1.0 | ||
with: | ||
lockfile: ".github/workflows/requirements.txt" | ||
- id: start | ||
name: Start action runners | ||
continue-on-error: true | ||
run: | | ||
python3 start/start-action-runners.py ${{ inputs.number }} || echo "exit_code=$?" >> $GITHUB_OUTPUT | ||
env: | ||
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }} | ||
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} | ||
OS_AUTH_TYPE: v3applicationcredential | ||
OS_AUTH_URL: https://js2.jetstream-cloud.org:5000/v3/ | ||
OS_IDENTITY_API_VERSION: 3 | ||
OS_REGION_NAME: "IU" | ||
OS_INTERFACE: public |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
start_workflow: | ||
name: Start | ||
uses: ./.github/workflows/start.yaml | ||
secrets: inherit | ||
|
||
check_output: | ||
name: Check output | ||
needs: start_workflow | ||
# runs-on: ubuntu-latest | ||
runs-on: ${{ needs.start_workflow.outputs.exit_code == 3 && 'ubuntu-20.04' || 'ubuntu-24.04' }} | ||
|
||
steps: | ||
- run: "echo Exit code: ${{ needs.start_workflow.outputs.exit_code }}" |
This file was deleted.
Oops, something went wrong.
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