make ci run in this fork (#9)

This commit is contained in:
ChristopherHX
2025-01-26 12:20:26 +01:00
committed by GitHub
parent 92b3ece22e
commit 3d684447a5
5 changed files with 30 additions and 19 deletions

View File

@@ -24,7 +24,7 @@ rm -f act-cli.*.nupkg
mkdir -p tools mkdir -p tools
cp LICENSE tools/LICENSE.txt cp LICENSE tools/LICENSE.txt
cp VERIFICATION tools/VERIFICATION.txt cp VERIFICATION tools/VERIFICATION.txt
cp dist/act_windows_amd64_v1/act.exe tools/ cp dist/act-cli_windows_amd64_v1/act-cli.exe tools/
choco pack act-cli.nuspec --version ${VERSION} choco pack act-cli.nuspec --version ${VERSION}
if [[ "$INPUT_PUSH" == "true" ]]; then if [[ "$INPUT_PUSH" == "true" ]]; then
choco push act-cli.${VERSION}.nupkg --api-key ${INPUT_APIKEY} -s https://push.chocolatey.org/ --timeout 180 choco push act-cli.${VERSION}.nupkg --api-key ${INPUT_APIKEY} -s https://push.chocolatey.org/ --timeout 180

View File

@@ -27,7 +27,7 @@ jobs:
version: v1.62 version: v1.62
- uses: megalinter/megalinter/flavors/go@v8.3.0 - uses: megalinter/megalinter/flavors/go@v8.3.0
env: env:
DEFAULT_BRANCH: master DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false VALIDATE_ALL_CODEBASE: false
GITHUB_STATUS_REPORTER: ${{ !env.ACT }} GITHUB_STATUS_REPORTER: ${{ !env.ACT }}
@@ -117,73 +117,73 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-linux-amd64 name: act-linux-amd64
path: dist/act_linux_amd64_v1/act path: dist/act-cli_linux_amd64_v1/act-cli
- name: Capture i386 (32-bit) Linux binary - name: Capture i386 (32-bit) Linux binary
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-linux-i386 name: act-linux-i386
path: dist/act_linux_386/act path: dist/act-cli_linux_386/act-cli
- name: Capture arm64 (64-bit) Linux binary - name: Capture arm64 (64-bit) Linux binary
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-linux-arm64 name: act-linux-arm64
path: dist/act_linux_arm64/act path: dist/act-cli_linux_arm64/act-cli
- name: Capture armv6 (32-bit) Linux binary - name: Capture armv6 (32-bit) Linux binary
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-linux-armv6 name: act-linux-armv6
path: dist/act_linux_arm_6/act path: dist/act-cli_linux_arm_6/act-cli
- name: Capture armv7 (32-bit) Linux binary - name: Capture armv7 (32-bit) Linux binary
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-linux-armv7 name: act-linux-armv7
path: dist/act_linux_arm_7/act path: dist/act-cli_linux_arm_7/act-cli
- name: Capture riscv64 (64-bit) Linux binary - name: Capture riscv64 (64-bit) Linux binary
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-linux-riscv64 name: act-linux-riscv64
path: dist/act_linux_riscv64/act path: dist/act-cli_linux_riscv64/act-cli
- name: Capture x86_64 (64-bit) Windows binary - name: Capture x86_64 (64-bit) Windows binary
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-windows-amd64 name: act-windows-amd64
path: dist/act_windows_amd64_v1/act.exe path: dist/act-cli_windows_amd64_v1/act-cli.exe
- name: Capture i386 (32-bit) Windows binary - name: Capture i386 (32-bit) Windows binary
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-windows-i386 name: act-windows-i386
path: dist/act_windows_386/act.exe path: dist/act-cli_windows_386/act-cli.exe
- name: Capture arm64 (64-bit) Windows binary - name: Capture arm64 (64-bit) Windows binary
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-windows-arm64 name: act-windows-arm64
path: dist/act_windows_arm64/act.exe path: dist/act-cli_windows_arm64/act-cli.exe
- name: Capture armv7 (32-bit) Windows binary - name: Capture armv7 (32-bit) Windows binary
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-windows-armv7 name: act-windows-armv7
path: dist/act_windows_arm_7/act.exe path: dist/act-cli_windows_arm_7/act-cli.exe
- name: Capture x86_64 (64-bit) MacOS binary - name: Capture x86_64 (64-bit) MacOS binary
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-macos-amd64 name: act-macos-amd64
path: dist/act_darwin_amd64_v1/act path: dist/act-cli_darwin_amd64_v1/act-cli
- name: Capture arm64 (64-bit) MacOS binary - name: Capture arm64 (64-bit) MacOS binary
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: act-macos-arm64 name: act-macos-arm64
path: dist/act_darwin_arm64/act path: dist/act-cli_darwin_arm64/act-cli
- name: Chocolatey - name: Chocolatey
uses: ./.github/actions/choco uses: ./.github/actions/choco
with: with:

View File

@@ -6,6 +6,7 @@ on:
jobs: jobs:
release: release:
# TODO use environment to scope secrets
name: release name: release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -29,26 +30,33 @@ jobs:
version: latest version: latest
args: release --clean args: release --clean
env: env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN || github.token }}
- name: Winget - name: Winget
uses: vedantmgoyal2009/winget-releaser@v2 uses: vedantmgoyal2009/winget-releaser@v2
with: with:
identifier: nektos.act identifier: nektos.act
installers-regex: '_Windows_\w+\.zip$' installers-regex: '_Windows_\w+\.zip$'
token: ${{ secrets.WINGET_TOKEN }} token: ${{ secrets.WINGET_TOKEN }}
if: env.ENABLED
env:
ENABLED: ${{ secrets.WINGET_TOKEN && '1' || '' }}
- name: Chocolatey - name: Chocolatey
uses: ./.github/actions/choco uses: ./.github/actions/choco
with: with:
version: ${{ github.ref }} version: ${{ github.ref }}
apiKey: ${{ secrets.CHOCO_APIKEY }} apiKey: ${{ secrets.CHOCO_APIKEY }}
push: true push: true
if: env.ENABLED
env:
ENABLED: ${{ secrets.CHOCO_APIKEY && '1' || '' }}
# TODO use ssh deployment key
- name: GitHub CLI extension - name: GitHub CLI extension
uses: actions/github-script@v7 uses: actions/github-script@v7
with: with:
github-token: ${{ secrets.GORELEASER_GITHUB_TOKEN }} github-token: ${{ secrets.CLI_GITHUB_TOKEN || secrets.GORELEASER_GITHUB_TOKEN }}
script: | script: |
const mainRef = (await github.rest.git.getRef({ const mainRef = (await github.rest.git.getRef({
owner: 'nektos', owner: context.repo.owner,
repo: 'gh-act', repo: 'gh-act',
ref: 'heads/main', ref: 'heads/main',
})).data; })).data;
@@ -59,3 +67,6 @@ jobs:
ref: context.ref, ref: context.ref,
sha: mainRef.object.sha, sha: mainRef.object.sha,
}); });
if: env.ENABLED
env:
ENABLED: ${{ (secrets.CLI_GITHUB_TOKEN || secrets.GORELEASER_GITHUB_TOKEN) && '1' || '' }}

View File

@@ -27,7 +27,7 @@ Please look at the [act user guide](https://nektosact.com) for more documentatio
# Support # Support
Need help? Ask on [Gitter](https://gitter.im/nektos/act)! Need help? Ask on [Discussions](https://github.com/actions-oss/act-cli/discussions)!
# Contributing # Contributing

View File

@@ -10,4 +10,4 @@ jobs:
- name: print env.variable - name: print env.variable
run: | run: |
echo ${{ env.variable }} echo ${{ env.variable }}
exit ${{ (env.variable == 'nektos') && '0' || '1'}} exit ${{ (env.variable == 'actions-oss') && '0' || '1'}}