diff --git a/_images/user/actions/actions-demo.png b/_images/user/actions/actions-demo.png new file mode 100644 index 00000000..291f8aa5 Binary files /dev/null and b/_images/user/actions/actions-demo.png differ diff --git a/_images/user/actions/demo-yaml.png b/_images/user/actions/demo-yaml.png new file mode 100644 index 00000000..27f22115 Binary files /dev/null and b/_images/user/actions/demo-yaml.png differ diff --git a/_images/user/actions/enable-repository.png b/_images/user/actions/enable-repository.png new file mode 100644 index 00000000..313d0db4 Binary files /dev/null and b/_images/user/actions/enable-repository.png differ diff --git a/_images/user/actions/workflow-demo.png b/_images/user/actions/workflow-demo.png new file mode 100644 index 00000000..fe1d6225 Binary files /dev/null and b/_images/user/actions/workflow-demo.png differ diff --git a/user/actions.md b/user/actions.md new file mode 100644 index 00000000..606f3f67 --- /dev/null +++ b/user/actions.md @@ -0,0 +1,41 @@ +--- +layout: '~/layouts/Markdown.astro' +title: 'Forgejo Actions' +license: 'CC-BY-SA-4.0' +--- + +`Forgejo Actions` provides continuous integration driven from the files in the `.forgejo/workflows` directory of a repository. + +# Quick start + +- Verify that `Enable Repository Actions` is checked in the `Repository` tab of the `/{owner}/{repository}/settings` page. + +![enable actions](../../../../images/v1.20/user/actions/enable-repository.png) + +- Add the following to the `.forgejo/workflows/demo.yaml` file in the repository. + +```yaml +on: [push] +jobs: + test: + runs-on: ubuntu-latest + steps: + - run: echo All Good +``` + +![demo.yaml file](../../../../images/v1.20/user/actions/demo-yaml.png) + +- Go to the `Actions` tab of the `/{owner}/{repository}/actions` page of the repository to see the result of the run. + +![actions results](../../../../images/v1.20/user/actions/actions-demo.png) + +- Click on the workflow link to see the details and the job execution logs. + +![actions results](../../../../images/v1.20/user/actions/workflow-demo.png) + +# Glossary + +- **workflow:** a file in the `.forgejo/workflows` directory that contains **jobs**. +- **job:** a sequential set of **steps**. +- **step:** a command the **runner** is required to carry out. +- **runner:** the [Forgejo runner](https://code.forgejo.org/forgejo/runner) daemon tasked to execute the **workflows**. diff --git a/user/index.md b/user/index.md index 9e81c0e0..542994ba 100644 --- a/user/index.md +++ b/user/index.md @@ -27,6 +27,7 @@ involved in running it on their machines. - [Branch and tag protection](protection) - Advanced Usage - [Issue and Pull Request Templates](issue-pull-request-templates) + - [Actions](actions) - [Merge Message templates](merge-message-templates) - [Generating an Access Token](https://docs.codeberg.org/advanced/access-token/) - [Webhooks](webhooks)