Skip to content

sustainable-computing-io/metal-runner-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metal-runner-action

Experimental

GitHub Super-Linter

This Experimental GitHub Action sets up an Equinix Metal server that can be used to run code in your workflows.

💡 See also:

Inputs

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 Yes -
provisioning_timeout How long to wait for provisioning (min) No 30

Usage

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

Support

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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published