46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
# Sample workflow for a consuming project.
|
|
# Copy to <your-repo>/.gitea/workflows/ci.yml and adjust the host/org.
|
|
#
|
|
# If your Gitea instance has DEFAULT_ACTIONS_URL = self (app.ini, [actions]),
|
|
# you can use the short form devops/ci-templates/actions/hello@v1.0.0.
|
|
# Otherwise use the full URL as below.
|
|
|
|
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
hello:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: https://gitea.example.com/devops/ci-templates/actions/hello@v1.0.0
|
|
with:
|
|
name: Sherif
|
|
|
|
tag:
|
|
runs-on: ubuntu-latest
|
|
needs: hello
|
|
outputs:
|
|
tag: ${{ steps.tag.outputs.tag }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # auto-tag needs the full tag history
|
|
- id: tag
|
|
uses: https://gitea.example.com/devops/ci-templates/actions/auto-tag@v1.0.0
|
|
with:
|
|
tag-type: dev
|
|
push-tag: "true"
|
|
push-token: ${{ secrets.GIT_PUSH_TOKEN }}
|
|
|
|
notify:
|
|
runs-on: ubuntu-latest
|
|
needs: tag
|
|
steps:
|
|
- uses: https://gitea.example.com/devops/ci-templates/actions/notify@v1.0.0
|
|
with:
|
|
status: success
|
|
message: "tagged ${{ needs.tag.outputs.tag }}"
|