Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
b4cb324e8e | |||
64e90984a1 | |||
510e80bc53 | |||
7cc00e7454 | |||
5186557e59 | |||
0b6fd361ba | |||
92f10fe929 | |||
dc89082921 | |||
9e0635952c | |||
14b148d711 | |||
16c8b25ac6 | |||
0fe2e338b9 | |||
3ee52cf7e5 | |||
c454f058dd | |||
b05e7bb644 | |||
95cbf6228f | |||
63282d12ba | |||
2fa05ebc90 | |||
7462f1affa | |||
fadddc902a | |||
17ea573bfd | |||
b2c5b6c4f9 | |||
eaff0f80c8 | |||
0e9735a86c | |||
b39a7d4108 | |||
1d45d2a91d | |||
4115763399 |
@@ -1,36 +1,33 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ github.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: [self-hosted, linux]
|
||||
Gitea-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
volumes:
|
||||
- ubuntu_hostedtoolcache:/opt/hostedtoolcache
|
||||
env:
|
||||
DOCKER_REGISTRY: registry.cn-hangzhou.aliyuncs.com
|
||||
DOCKER_USERNAME: rsjst
|
||||
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 ${{ github.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 ${{ github.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
|
||||
- name: Get Meta
|
||||
id: meta
|
||||
run: |
|
||||
echo ::set-output name=REPO::`echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}'`
|
||||
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||
echo REPO_VERSION=$(echo ${{ github.ref }} | awk -F"/" '{print $3}' | awk -F"v" '{print $2}') >> $GITHUB_OUTPUT
|
||||
|
||||
- run: echo "🍏 This job's status is ${{ steps.get_version.outputs.VERSION }}."
|
||||
- run: echo "🍏 This job's status is ${{ steps.get_repo.outputs.REPO }}."
|
||||
- run: echo "🍏 This job's status is ${{ steps.meta.outputs.VERSION }}."
|
||||
- run: echo "🍏 This job's status is ${{ steps.meta.outputs.REPO }}."
|
||||
- run: echo ${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: WeChat Work notification
|
||||
uses: seepine/action-wechat-work@master
|
||||
env:
|
||||
WECHAT_WORK_BOT_WEBHOOK: ${{secrets.WECHAT_WORK_BOT_WEBHOOK}}
|
||||
with:
|
||||
msgtype: markdown
|
||||
content: "${{ steps.meta.outputs.REPO_NAME }}构建成功。\n
|
||||
> 镜像:${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}"
|
Reference in New Issue
Block a user