GithubHelp home page GithubHelp logo

ismtabo / asdf-actions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asdf-vm/actions

0.0 0.0 0.0 890 KB

GitHub Actions for the asdf version manager

Home Page: https://asdf-vm.com

License: Apache License 2.0

JavaScript 98.75% TypeScript 1.25%

asdf-actions's Introduction

GitHub Actions for asdf

GitHub Release lint test build CodeQL

A collection of asdf GitHub Actions for use in your workflows.

Action Use Description
install asdf-vm/actions/install@v3 Installs asdf & tools in .tool-versions.
Plugins fetched from asdf-vm/asdf-plugins
setup asdf-vm/actions/setup@v3 Only install asdf CLI.
plugins-add asdf-vm/actions/plugins-add@v3 Only install plugins, not tools.
plugin-test asdf-vm/actions/plugin-test@v3 Plugin author test automation.

Usage

steps:
  - name: Install asdf & tools
    uses: asdf-vm/actions/install@v3

To avoid breaking changes, use the full Semantic Version vX.Y.Z. Below are the available version pinning options:

steps:
  # Reference a specific commit (most strict, for the supply-chain paranoid)
  - uses: asdf-vm/actions/install@f4acd427436df623426c29f7e3e9ea715be28396
  # Reference a semver major version only (GitHub recommended)
  - uses: asdf-vm/actions/install@v3
  # Reference a semver version of a release (recommended)
  - uses: asdf-vm/actions/[email protected]
  # Reference a branch (most dangerous)
  - uses: asdf-vm/actions/install@master

Automatic Actions Updating

GitHub Dependabot has support for tracking GitHub Actions releases and automatically creating PRs with these updates.

# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly" # Check for updates to GitHub Actions every week

Actions

Install

Installs asdf & tools in .tool-versions. Plugins fetched from asdf-vm/asdf-plugins

steps:
  - uses: asdf-vm/actions/install@v3

See action.yml inputs.

Plugin Test

Plugin author test automation

steps:
  - uses: asdf-vm/actions/plugin-test@v3
    with:
      command: my_tool --version

See action.yml inputs.

Setup

Only install asdf CLI.

Note: this Action is used internally by Install & Plugin Test, opt for those first.

steps:
  - uses: asdf-vm/actions/setup@v3

See action.yml inputs.

Plugins Add

Only install plugins, not tools.

Note: this Action is used internally by Install & Plugin Test, opt for those first.

steps:
  - uses: asdf-vm/actions/plugins-add@v3

See action.yml inputs.

Miscellaneous

Full Example Workflow

This example workflow demonstrates how to use the Install Action: asdf-vm/actions/install@v3. It is taken from the asdf-vm/asdf-plugin-template repository.

# example .tool-versions
shellcheck 0.9.0
shfmt 3.6.0
# https://github.com/asdf-vm/asdf-plugin-template/blob/main/template/.github/workflows/lint.yml
name: Lint

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  shellcheck:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: asdf-vm/actions/install@v3
      - run: scripts/lint.bash
      # script runs Shellcheck, Shfmt etc installed by previous action

  actionlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Check workflow files
        uses: docker://rhysd/actionlint:1.6.23
        with:
          args: -color

Docker Tricks

Using the default GitHub Action images may cause problems during plugin testing due to current asdf implementation constraints. If you experience issues, you can use Docker containers to reduce the variables of your environment.

jobs:
  plugin_test:
    strategy:
      fail-fast: false
      matrix:
        container:
          - alpine:latest
          - centos:latest
          - ubuntu:latest

    runs-on: ubuntu-latest

    container:
      image: ${{ matrix.container }}

    steps:
      - uses: asdf-vm/actions/plugin-test@v3
        with:
          command: my_tool --version

asdf-actions's People

Contributors

dependabot[bot] avatar smorimoto avatar jthegedus avatar dependabot-preview[bot] avatar vic avatar github-actions[bot] avatar ismtabo avatar sato11 avatar ameausoone avatar jimmidyson avatar jonathanmorley avatar superbrothers avatar kianmeng avatar pboling avatar stratus3d avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.