Skip to content

Run your github action workflows locally to verify workflows. #33

Open
@GeunjeLEE

Description

@GeunjeLEE

AS-IS

Cloudforet maintainers sometimes develop github actions workflow for building projects.
Usually, they write workflows and verify in the cloudforet github or the test organization they own.

But, it takes a lot of effort to verify workflows.

Suggestion

Use act to write and verify github actions workflow!

Run your GitHub Actions locally! Why would you want to do this? Two reasons:

Fast Feedback - Rather than having to commit/push every time you want to test out the changes you are making to your .github/workflows/ files (or for any changes to embedded GitHub actions), you can use act to run the actions locally. The environment variables and filesystem are all configured to match what GitHub provides.

Local Task Runner - I love make. However, I also hate repeating myself. With act, you can use the GitHub Actions defined in your .github/workflows/ to replace your Makefile!

It is super simple to install and run, also provide various options (like dry-run)

Consideration

But, You should consider the following.

  1. To use a secret context locally, you need to set up an env file.
  2. Act doesn't seem to support variable contexts yet.
  3. Because maintainers must have env files for all secrets. It may lead to a security incident.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions