chore: update docs for installing act as GH CLI extension
This commit is contained in:
parent
78e1ceb0a8
commit
7ada9d3f74
3 changed files with 25 additions and 26 deletions
26
.github/workflows/gh-extension.yml
vendored
26
.github/workflows/gh-extension.yml
vendored
|
@ -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,
|
|
||||||
});
|
|
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
|
@ -39,3 +39,20 @@ jobs:
|
||||||
version: ${{ github.ref }}
|
version: ${{ github.ref }}
|
||||||
apiKey: ${{ secrets.CHOCO_APIKEY }}
|
apiKey: ${{ secrets.CHOCO_APIKEY }}
|
||||||
push: true
|
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,
|
||||||
|
});
|
||||||
|
|
|
@ -108,6 +108,14 @@ Using the latest [Nix command](https://nixos.wiki/wiki/Nix_command), you can run
|
||||||
nix run nixpkgs#act
|
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
|
## Other install options
|
||||||
|
|
||||||
### Bash script
|
### Bash script
|
||||||
|
|
Loading…
Reference in a new issue