Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

基于 Python 容器的 GitHub Actions 模板

actions statusreleaselicensePRs Welcome

这是一个用于快速创建 GitHub Actions 的模板,里面包含一段 Python 小程序,该应用程序内置到了 Container Action 中。

main.py 文件中有一个小示例,展示了如何获取 Action 输入参数并返回 Action 输出。

如果你想基于 Python 容器开发 GitHub Actions,可以在当前仓库上点击 Use this template,基于当前模板创建一个新的存储库。

使用

在此处描述如何使用你的 Action。

Workflow 示例

name: My Workflowon: [push, pull_request]jobs:
build:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v2name: Run action# 放置你的 Action 仓库
- uses: username/myaction@main# Action 的输入参数with:
username: yanglbme

入参

参数描述是否必传默认值
username用户名-
age年龄18

出参

参数描述
res一个输出参数

实例

输入

with:
username: yanglbmeage: 99

输出

steps:
- uses: actions/checkout@v2
- name: Run actionid: myaction# 放置你的 Action 仓库uses: me/myaction@main# Action 的输入参数with:
username: yanglbme# 演示如何使用 Action 的输出
- name: Check outputsrun: |echo "Outputs - ${{ steps.myaction.outputs.res }}"

License

MIT

About

A template for building GitHub Actions in Python | 一个用于开发 GitHub Actions 的 Python 容器模板

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages