2023-03-21 16:11:16 +08:00
|
|
|
name: Gitea Actions Demo
|
2023-03-21 16:13:14 +08:00
|
|
|
on: [push]
|
2023-03-21 16:11:16 +08:00
|
|
|
jobs:
|
2023-03-21 17:09:02 +08:00
|
|
|
Gitea-Actions:
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-22 10:00:32 +08:00
|
|
|
container:
|
|
|
|
image: catthehacker/ubuntu:act-latest
|
2023-03-22 11:37:43 +08:00
|
|
|
# volumes:
|
|
|
|
# - ubuntu_hostedtoolcache:/opt/hostedtoolcache
|
|
|
|
# - gradle_cache:/root/.gradle
|
2023-03-22 10:40:47 +08:00
|
|
|
env:
|
2023-03-22 10:43:07 +08:00
|
|
|
DOCKER_REGISTRY: registry.cn-hangzhou.aliyuncs.com
|
|
|
|
DOCKER_USERNAME: rsjst
|
2023-03-21 16:11:16 +08:00
|
|
|
steps:
|
2023-03-22 11:26:41 +08:00
|
|
|
|
2023-03-22 10:55:18 +08:00
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
distribution: zulu
|
|
|
|
java-version: 11
|
2023-03-22 11:26:41 +08:00
|
|
|
cache: gradle
|
2023-03-22 11:25:32 +08:00
|
|
|
|
2023-03-21 16:13:14 +08:00
|
|
|
|
2023-03-22 10:36:05 +08:00
|
|
|
- name: Get Meta
|
|
|
|
id: meta
|
2023-03-22 10:43:07 +08:00
|
|
|
run: |
|
|
|
|
echo ::set-output name=REPO::`echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}'`
|
2023-03-22 10:55:18 +08:00
|
|
|
echo ::set-output name=VERSION::`git describe --abbrev=0 --tags | awk -F"v" '{print $2}'`
|
2023-03-22 10:36:05 +08:00
|
|
|
|
|
|
|
|
2023-03-22 10:43:07 +08:00
|
|
|
|
|
|
|
- run: echo ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_USERNAME }}/${{ steps.meta.outputs.REPO }}:latest
|
2023-03-21 16:11:16 +08:00
|
|
|
|