Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] ci: add github actions workflow to test self hosted runner #282

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anjannath
Copy link
Collaborator

@anjannath anjannath commented Aug 29, 2024

  • need to use a cloud storage for the backend, to be able to remove the instance after the job
  • Add mapt destroy job to remove provisioned instance

name: Test Self hosted runner addition

on:
workflow_call:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need a strategy based on workflow_run to get access to secrets and test the binary build from the forked repo, with the current build you have here it will build it form the head of the main instead of from the PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also have to store the backend in a cloud storage to be able to destroy the created resources later

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anjannath ^^ Just added all required secrets for this:

  • ARM_TENANT_ID
  • ARM_SUBSCRIPTION_ID
  • ARM_CLIENT_ID
  • ARM_CLIENT_SECRET
  • AZURE_STORAGE_ACCOUNT
  • AZURE_STORAGE_KEY

Also to use the remote storage for backed-url the url would be something like (notice base name should exactly match mapt-gh-runner-mapt-state):

--backed-url azblob://mapt-gh-runner-mapt-state/${{ github.repository }}-${{ github.run_id }} 

Copy link
Collaborator Author

@anjannath anjannath Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This event will only trigger a workflow run if the workflow file is on the default branch.

from: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_run

It seems workflow_run only works when the workflow is already in the main branch, so need to test this first on my fork and then update the PR, we'll have to initially merge something and then create follow up PR to fix if any issues found

@anjannath anjannath force-pushed the ghc-runner branch 4 times, most recently from 5c0959e to 0b56135 Compare October 4, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants