From 7ada9d3f74f4d8705ba01ce110f3d611989dd442 Mon Sep 17 00:00:00 2001 From: Casey Lee Date: Fri, 20 Jan 2023 10:22:58 -0800 Subject: [PATCH] chore: update docs for installing act as GH CLI extension --- .github/workflows/gh-extension.yml | 26 -------------------------- .github/workflows/release.yml | 17 +++++++++++++++++ README.md | 8 ++++++++ 3 files changed, 25 insertions(+), 26 deletions(-) delete mode 100644 .github/workflows/gh-extension.yml diff --git a/.github/workflows/gh-extension.yml b/.github/workflows/gh-extension.yml deleted file mode 100644 index e42bdeb..0000000 --- a/.github/workflows/gh-extension.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: gh-extension -on: - workflow_dispatch - -jobs: - release: - name: release - runs-on: ubuntu-latest - steps: - - name: Release extension - uses: actions/github-script@v5 - with: - github-token: ${{ secrets.GORELEASER_GITHUB_TOKEN }} - script: | - const mainRef = (await github.rest.git.getRef({ - owner: 'nektos', - repo: 'gh-act', - ref: 'heads/main', - })).data; - console.log(mainRef); - github.rest.git.createRef({ - owner: 'nektos', - repo: 'gh-act', - ref: 'refs/tags/v0.2.39', - sha: mainRef.object.sha, - }); diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2dce51b..a08896d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,3 +39,20 @@ jobs: version: ${{ github.ref }} apiKey: ${{ secrets.CHOCO_APIKEY }} push: true + - name: GitHub CLI extension + uses: actions/github-script@v5 + with: + github-token: ${{ secrets.GORELEASER_GITHUB_TOKEN }} + script: | + const mainRef = (await github.rest.git.getRef({ + owner: 'nektos', + repo: 'gh-act', + ref: 'heads/main', + })).data; + console.log(mainRef); + github.rest.git.createRef({ + owner: 'nektos', + repo: 'gh-act', + ref: `refs/tags/${context.ref}`, + sha: mainRef.object.sha, + }); diff --git a/README.md b/README.md index fd944d9..f8fb81c 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,14 @@ Using the latest [Nix command](https://nixos.wiki/wiki/Nix_command), you can run nix run nixpkgs#act ``` +## Installation as GitHub CLI extension + +Act can be installed as a [GitHub CLI](https://cli.github.com/) extension: + +```sh +gh extension install nektos/gh-act +``` + ## Other install options ### Bash script