This commit is contained in:
千里走单骑 2024-04-01 23:28:14 +08:00
parent 81a7dfd5b1
commit 5308b89d50
3 changed files with 17 additions and 43 deletions

View File

@ -1,7 +1,7 @@
on:
push:
branches:
- main
# branches:
# - main
tags:
- v*
pull_request:

View File

@ -3,8 +3,8 @@ run-name: ${{ github.actor }} Gitea Actions 🚀🚀🚀
on:
push:
# Sequence of patterns matched against refs/heads
branches:
- main
# branches:
# - main
# Sequence of patterns matched against refs/tags
tags:
- v*

View File

@ -1,45 +1,19 @@
name: Gitea Actions Demo
run-name: ${{ github.actor }} is testing out Gitea Actions
# on: [push]
on:
push:
# Sequence of patterns matched against refs/heads
# branches:
# - main
# # Sequence of patterns matched against refs/tags
tags:
- v*
env:
yamlrepo: youling/gitops
DOMAIN: gitea.lntu.edu.cn
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
# - run: echo " The job was automatically triggered by a ${{ github.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 ${{ github.ref }} and your repository is ${{ github.repository }}."
# # - name: Check out repository code
# # uses: actions/checkout@v3
# - run: echo " The token ${{ github.token }} "
# - run: echo " The ${{ github.repository }} repository has been cloned to the runner."
# - run: echo " The workflow is now ready to test your code on the runner."
# - run: echo " The workspace is ${{ github.workspace }}."
# - name: List files in the repository
# run: |
# ls ${{ github.workspace }}
# - run: echo " This job's status is ${{ job.status }}."
- name: Docker meta
id: meta
uses: https://${{ env.DOMAIN }}/actions/metadata-action@v5
with:
images: name/app
tags: type=schedule,pattern={{date 'YYYY/MM/DD-hhmmss'}}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y/%m/%d%H%M%S')"
- run: echo " The workspace is ${{ steps.date.outputs.date }} "
- run: echo " The workspace is ${{ steps.meta.outputs.tags }} "
- run: echo " The workspace is ${{ steps.meta.outputs }} "
- 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@v3
- 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 }}."