Skip to content

equinix-labs/metal-runner-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 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 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 ""

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/metal-project-action@v0.14.0
        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/metal-action-runner@v0.1.1
        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/metal-sweeper-action@v0.6.0
        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

Packages

No packages published