Compare commits
29 Commits
Author | SHA1 | Date | |
---|---|---|---|
0d14f451f3 | |||
6dd54fafd6 | |||
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,47 @@
|
|||||||
name: Gitea Actions Demo
|
name: Gitea Actions Demo
|
||||||
run-name: ${{ github.actor }} is testing out Gitea Actions 🚀
|
on:
|
||||||
on: [push]
|
push:
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
jobs:
|
jobs:
|
||||||
Explore-Gitea-Actions:
|
Gitea-Actions:
|
||||||
runs-on: [self-hosted, linux]
|
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:
|
steps:
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
- name: Checkout
|
||||||
- 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
|
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."
|
- run: cat README.md
|
||||||
- name: List files in the repository
|
|
||||||
run: |
|
- name: Setup Java
|
||||||
ls ${{ github.workspace }}
|
uses: actions/setup-java@v3
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
with:
|
||||||
|
distribution: zulu
|
||||||
|
java-version: 11
|
||||||
|
cache: gradle
|
||||||
|
|
||||||
|
- run: java -version
|
||||||
|
|
||||||
- name: Get Meta
|
- name: Get Meta
|
||||||
id: meta
|
id: meta
|
||||||
run: |
|
run: |
|
||||||
echo ::set-output name=REPO::`echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}'`
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||||
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
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 ${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_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 }}."
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: WeChat Work notification
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: seepine/action-wechat-work@master
|
||||||
|
if: ${{ !secrets.WECHAT_WORK_BOT_WEBHOOK }}
|
||||||
- name: Set up Docker BuildX
|
env:
|
||||||
uses: docker/setup-buildx-action@v2
|
WECHAT_WORK_BOT_WEBHOOK: ${{ secrets.WECHAT_WORK_BOT_WEBHOOK }}
|
||||||
|
with:
|
||||||
|
msgtype: markdown
|
||||||
|
content: "${{ steps.meta.outputs.REPO_NAME }}构建成功。\n
|
||||||
|
> 镜像: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_USERNAME }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}"
|
Reference in New Issue
Block a user