This Experimental GitHub Action sets up an Equinix Metal server that can be used to run code in your workflows.
💡 See also:
- equinix-metal-device action
- equinix-metal-project action
- equinix-metal-sweeper action
- WIP equinix-metal-github-actions-examples examples
Name | Description | Required | Default |
---|---|---|---|
github_token |
GitHub token with repository scope | Yes | - |
metal_auth_token |
API Key for Equinix Metal | Yes | - |
metal_project_id |
Project ID for Equinix Metal | Yes | - |
metro |
Metro for Equinix Metal | Yes | - |
plan |
Plan for Equinix Metal | Yes | - |
os |
OS for Equinix Metal | No | ubuntu_22_04 |
provisioning_timeout |
How long to wait for provisioning (min) | No | 30 |
repository_level |
Set to true to enable repository level registration token | No | false |
custom_script |
Custom user script to run (as root) before starting the runner | No | "" |
name: CI Pipeline
on:
push:
branches:
- main
jobs:
Project:
name: "Create Project"
runs-on: ubuntu-latest
steps:
- name: metal-project-action
id: metal-project-action
uses: equinix-labs/[email protected]
with:
projectName: "metal-runner-demo"
userToken: ${{ secrets.METAL_AUTH_TOKEN }}
outputs:
projectID: ${{ steps.metal-project-action.outputs.projectID }}
Runner:
name: "Create Runner"
needs: Project
runs-on: ubuntu-latest
steps:
- name: metal-runner-action
uses: equinix-labs/[email protected]
with:
github_token: ${{ secrets.TEST_PAT_KEY }}
metal_auth_token: ${{ secrets.METAL_AUTH_TOKEN }}
metal_project_id: ${{ needs.Project.outputs.projectID }}
metro: "da"
plan: "c3.small.x86"
os: "ubuntu_20_04"
Demo:
name: "Demo Action"
needs: Runner
runs-on: self-hosted
steps:
- run: |
echo "Hello, Equinix Metal!"
echo "This is runner: ${{ runner.name }}"
echo "Running on ${{ runner.arch }} ${{ runner.os }}"
Cleanup:
name: "Cleanup"
runs-on: ubuntu-latest
needs: [Demo, Project]
steps:
- name: metal-sweeper-action
uses: equinix-labs/[email protected]
with:
authToken: ${{ secrets.METAL_AUTH_TOKEN }}
projectID: ${{ needs.Project.outputs.projectID }}
keepProject: false
This repository is Experimental meaning that it's based on untested ideas or techniques and not yet established or finalized or involves a radically new and innovative style! This means that support is best effort (at best!) and we strongly encourage you to NOT use this in production.