init
This commit is contained in:
parent
4bc4672477
commit
a8d0e41309
@ -1,19 +1,58 @@
|
|||||||
name: Gitea Actions Demo
|
I have rewritten the Gitea Actions YAML workflow to include the Build, two separate Test jobs, and Deploy jobs, while removing the three-line comments that indicated the job number and name.
|
||||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
||||||
|
Here is the revised pipeline structure:
|
||||||
|
YAML
|
||||||
|
|
||||||
|
name: CI/CD Build Test Deploy Pipeline
|
||||||
|
run-name: ${{ gitea.actor }} is deploying a change 🚀
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Explore-Gitea-Actions:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
- 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 "🐧 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 }}."
|
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||||
- name: Check out repository code
|
|
||||||
|
- name: Checkout repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
- 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
|
- name: List files in the repository
|
||||||
run: |
|
run: |
|
||||||
|
echo "Listing files to confirm build context..."
|
||||||
ls ${{ gitea.workspace }}
|
ls ${{ gitea.workspace }}
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
|
||||||
|
- run: echo "✅ BUILD stage completed successfully. Artifacts would be generated here."
|
||||||
|
|
||||||
|
unit_test:
|
||||||
|
needs: [build]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Run Unit Tests
|
||||||
|
run: echo "🧪 Starting Unit Tests (First test job echo)."
|
||||||
|
|
||||||
|
- run: echo "👍 UNIT TEST job finished."
|
||||||
|
|
||||||
|
integration_test:
|
||||||
|
needs: [build]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Run Integration Tests
|
||||||
|
run: echo "✅ Integration Tests Passed (Second test job echo)."
|
||||||
|
|
||||||
|
- run: echo "👍 INTEGRATION TEST job finished."
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: [unit_test, integration_test]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Deploy Application
|
||||||
|
run: |
|
||||||
|
echo "🚀 Deploying to Production/Staging environment..."
|
||||||
|
echo "Deployment initiated at $(date) (The deploy echo)."
|
||||||
|
|
||||||
|
- run: echo "🍏 Pipeline finished. The final job status is ${{ job.status }}."
|
||||||
Loading…
x
Reference in New Issue
Block a user