test cicd
This commit is contained in:
parent
8c5da3568b
commit
8db175e56f
59
.gitea/workflows/demo.yaml
Normal file
59
.gitea/workflows/demo.yaml
Normal file
@ -0,0 +1,59 @@
|
||||
name: Demo
|
||||
run-name: ${{ gitea.actor }} is runs ci pipeline
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
demo-ci-flow:
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- "${{ inputs.chosen-os }}"
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Test CI action command
|
||||
run: ls -la
|
||||
- name: Test CI action command 1
|
||||
run: pwd
|
||||
- name: Test CI action command 2
|
||||
run: whoami
|
||||
- name: Test CI action command 3
|
||||
run: cat /etc/os-release
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
|
||||
demo-cd-flow:
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- "${{ inputs.chosen-os }}"
|
||||
needs: build
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Test CD action command
|
||||
run: ls -la
|
||||
- name: Test CD action command 1
|
||||
run: pwd
|
||||
- name: Test CD action command 2
|
||||
run: whoami
|
||||
- name: Test CD action command 3
|
||||
run: cat /etc/os-release
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
@ -7,8 +7,13 @@ on:
|
||||
|
||||
jobs:
|
||||
ci-flow:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- "${{ inputs.chosen-os }}"
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Test CI action command
|
||||
@ -19,12 +24,23 @@ jobs:
|
||||
run: whoami
|
||||
- name: Test CI action command 3
|
||||
run: cat /etc/os-release
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
|
||||
cd-flow:
|
||||
runs-on: alpine-latest
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- "${{ inputs.chosen-os }}"
|
||||
needs: build
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Test CD action command
|
||||
@ -35,3 +51,9 @@ jobs:
|
||||
run: whoami
|
||||
- name: Test CD action command 3
|
||||
run: cat /etc/os-release
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
Loading…
Reference in New Issue
Block a user