├── .github └── workflows │ └── release.yml ├── LICENSE └── README.md /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | on: 3 | push: 4 | tags: 5 | - v* 6 | 7 | permissions: 8 | contents: write 9 | 10 | jobs: 11 | release: 12 | name: release 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v4 16 | - uses: actions/checkout@v4 17 | with: 18 | repository: nektos/act 19 | path: act 20 | ref: ${{ github.ref }} 21 | fetch-depth: 0 22 | - run: rm -rf act/.git 23 | - run: mv act/* . 24 | - uses: actions/setup-go@v5 25 | id: setup-go 26 | with: 27 | go-version-file: go.mod 28 | check-latest: true 29 | - uses: actions/cache@v4 30 | if: ${{ !env.ACT }} 31 | with: 32 | path: ~/go/pkg/mod 33 | key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 34 | restore-keys: | 35 | ${{ runner.os }}-go- 36 | - uses: cli/gh-extension-precompile@v2 37 | with: 38 | go_version: ${{ steps.setup-go.outputs.go-version }} 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 nektos 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![act-logo](https://raw.githubusercontent.com/wiki/nektos/act/img/logo-150.png) 2 | # Overview 3 | 4 | [GitHub CLI](https://docs.github.com/en/github-cli/github-cli/about-github-cli) Extension for [nektos/act](https://github.com/nektos/act) which allows you to run your [GitHub Actions](https://developer.github.com/actions/) locally! 5 | 6 | # How Does It Work? 7 | 8 | When you run `act` it reads in your GitHub Actions from `.github/workflows/` and determines the set of actions that need to be run. It uses the Docker API to either pull or build the necessary images, as defined in your workflow files and finally determines the execution path based on the dependencies that were defined. Once it has the execution path, it then uses the Docker API to run containers for each action based on the images prepared earlier. The [environment variables](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables) and [filesystem](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems) are all configured to match what GitHub provides. 9 | 10 | Let's see it in action with a [sample repo](https://github.com/cplee/github-actions-demo)! 11 | 12 | ![Demo](https://github.com/nektos/act/wiki/quickstart/act-quickstart-2.gif) 13 | 14 | To learn more, check out the [README.md](https://github.com/nektos/act/blob/master/README.md) for nektos/act. 15 | 16 | # Installation 17 | 18 | To install, run: `gh extension install nektos/gh-act` 19 | --------------------------------------------------------------------------------