Github Action
约 2 分钟阅读
- actions/virtual-environmentsGitHubactions/virtual-environments
- docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
- actionsGitHub Orgactions
- gitea.com/actions
- 不支持允许错误 #399GitHub Issueactions/toolkit#399
- golangci-lint-action CI 耗时非常长 #297GitHub Issuegolangci/golangci-lint-action#297
step
- id
- if name uses run shell with env continue-on-error timeout-minutes
uses
# {owner}/{repo}@{ref}
# {owner}/{repo}/{path}@{ref}
- uses: actions/checkout@v3
- uses: actions/aws/ec2@main
# 相同仓库 - 需要先 checkout
# ./path/to/dir
- uses: ./.github/actions/my-action
# docker://{image}:{tag}
# docker://{host}/{image}:{tag}
- uses: docker://alpine:3.8
- uses: docker://ghcr.io/OWNER/IMAGE_NAME
- uses: docker://gcr.io/cloud-builders/gradle
# private repo
- uses: actions/checkout@v3
with:
repository: octocat/my-private-repo
ref: v1.0
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
path: ./.github/actions/my-private-repo
# from private repo
- uses: ./.github/actions/my-private-repo/my-actionpnpm template
name: Build
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: Build Cache
id: build-cache
uses: actions/cache@v2
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
# Real build
- run: make ci
- name: Deploy Pages
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
branch: gh-pages
folder: out
single-commit: trueFAQ
compile: version does not match go tool version
- name: Run CI
run: |
export PATH=${GOROOT}/bin:$PATH
go version- actions/setup-go#107GitHub Issueactions/setup-go#107
关联信息
反向链接、本文链接的其他页面和外部资料。
反向链接
- Gitea Action笔记 · Action
参考 · Github Action · Runner · vs Github Action · Mirror · https://github.com/actions/checkout · https://gitea.com/actions/checkout
References
GitHub5 条
- actionsgithub.com/actions
- actions/setup-go#107github.com/actions/setup-go/issues/107
- actions/toolkit#399github.com/actions/toolkit/issues/399
- actions/virtual-environmentsgithub.com/actions/virtual-environments
- golangci/golangci-lint-action#297github.com/golangci/golangci-lint-action/issues/297
其他外链2 条
- docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actionsdocs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
- gitea.com/actionsgitea.com/actions