Skip to content

Github Actions

Quick Start

GitHub Actions 快速入门

About workflows

Workflows are defined in the .github/workflows directory in a repository. A repository can have multiple workflows, each which can perform a different set of tasks

Events that trigger workflows

Events that trigger workflows

Environment Variables

Default environment variables

Get current date and time in GitHub workflows

Docker

My Workflow

My Workflow

WARNING

不同分支下 workflow 名称相同(非 yml 文件名称相同)时,即使触发事件发生,workflow 可能也不会启动。

docker/build-push-action

Multi-platform image with GitHub Actions

最佳实践-使用Github Actions来构建跨平台容器镜像

Writes all result files as a single tarball on the client

导出 tar 包,便于后续将其发布到 Github Releases:

List of output destinations (format: type=local,dest=path)

Set the export action for the build result (-o, --output)

Exporters overview

设置构建结果的输出方式 (-o, --output)

docker保存、导入、导出和加载tar及其tar.gz

NOTE

未正确设置可能导致由 tarball 导入得到的 Docker image 不可用,故工作流中换成了从 Docker Hub 拉取 Docker image,再导出为 tarball 这种方式。

其他工作流参考:

快速构建指定架构/平台的docker镜像

Github Pages

My Workflow

My Workflow

Deploy Your VitePress Siteeploy Your VitePress Site

Github Releases

My Workflow

My Workflow

A GitHub Action for creating GitHub Releases on Linux, Windows, and macOS virtual environments

NO LICENSE HERE