Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3711506160 | |||
| 1f75ee9ffb | |||
| b409324a19 | |||
| 5f7973b986 | |||
| 25ee31f98d | |||
| 09b672f6dd | |||
| 3834810b5a | |||
| a65df3922e | |||
| 01220dc8a5 | |||
| 2ebe47cbe3 | |||
| 61e66d370c | |||
| 3a9d8d2de1 | |||
| 47fc363ccc | |||
| 8e7da47925 | |||
| 1fbd882452 | |||
| 80a16c73fb | |||
| 8ef5834e9c | |||
| adbbdf6513 | |||
| c56fcd2b62 | |||
| 22ce2066f8 | |||
| 5999e99dde | |||
| 576fca21da | |||
| 24da2dd035 | |||
|
|
5f1c930a6d | ||
|
|
55646f28cb | ||
| b5ff782c46 | |||
|
|
2f569e1dea | ||
|
|
e89514528a | ||
|
|
305aff8a6f | ||
|
|
32edce89c7 | ||
|
|
dde38ee64d | ||
|
|
46127b8287 | ||
|
|
436867b27d | ||
|
|
298ed501d8 | ||
|
|
7f6d7f9100 | ||
|
|
fd10257f50 | ||
|
|
6598f6b95b | ||
|
|
80580710fc | ||
|
|
6d0f2da52b | ||
|
|
c5dd94c995 | ||
|
|
1db19d9160 | ||
| 2ac75ce7a2 | |||
| 08b0a8786f |
20
.gitea/workflows/fedora-checkout.yml
Normal file
20
.gitea/workflows/fedora-checkout.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
name: release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
checkout:
|
||||||
|
runs-on: rocky-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: https://git.phyllo.me/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: https://git.phyllo.me/actions/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
bin/**
|
||||||
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
name: release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/release-action@main
|
|
||||||
with:
|
|
||||||
files: |-
|
|
||||||
bin/**
|
|
||||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
|
||||||
62
README.md
62
README.md
@@ -1,3 +1,61 @@
|
|||||||
# tests-actions
|
# Gitea Actions testing ground
|
||||||
|
|
||||||
This repository is meant to test Gitea actions
|
This repository is a testing ground for several Gitea Actions used within the Phyllome OS project.
|
||||||
|
|
||||||
|
Gitea Actions closely resemble GitHub Actions, to the point that several GitHub Actions can be used in Gitea Actions workflows without modification.
|
||||||
|
|
||||||
|
## How to test actions locally
|
||||||
|
|
||||||
|
- Clone this repository locally
|
||||||
|
|
||||||
|
- Download the latest version of the act runner for your architecture [here](https://dl.gitea.com/act_runner/)
|
||||||
|
- For instance, if your computer is running Linux with an amd64 processor: `act_runner-0.2.12-linux-amd64`
|
||||||
|
|
||||||
|
```
|
||||||
|
curl https://dl.gitea.com/act_runner/0.2.12/act_runner-0.2.12-linux-amd64 --output act_runner
|
||||||
|
```
|
||||||
|
```
|
||||||
|
% Total % Received % Xferd Average Speed Time Time Time Current
|
||||||
|
Dload Upload Total Spent Left Speed
|
||||||
|
100 19.2M 100 19.2M 0 0 102M 0 --:--:-- --:--:-- --:--:-- 103M
|
||||||
|
```
|
||||||
|
|
||||||
|
- Add execute permission
|
||||||
|
|
||||||
|
```
|
||||||
|
chmod +x act_runner
|
||||||
|
```
|
||||||
|
|
||||||
|
- Run the act runner using the `exec` argument and specify the workflow file to be used:
|
||||||
|
|
||||||
|
```
|
||||||
|
./act_runner exec --workflows workflows/checkout.yml
|
||||||
|
```
|
||||||
|
```
|
||||||
|
INFO[0000] Using the only detected workflow event: push
|
||||||
|
INFO[0000] Planning jobs for event: push
|
||||||
|
INFO[0000] cache handler listens on: http://192.168.122.175:38917
|
||||||
|
INFO[0000] Start server on http://192.168.122.175:34567
|
||||||
|
[...]
|
||||||
|
[checkout/checkout] ⭐ Run Main https://git.phyllo.me/actions/checkout@v4
|
||||||
|
[checkout/checkout] 🐳 docker cp src=/home/lukas/test-actions/. dst=/home/lukas/test-actions
|
||||||
|
[checkout/checkout] ✅ Success - Main https://git.phyllo.me/actions/checkout@v4
|
||||||
|
[checkout/checkout] Cleaning up container for job checkout
|
||||||
|
[checkout/checkout] Cleaning up network for job checkout, and network name is: GITEA-ACTIONS-TASK-push_WORKFLOW-checkout_JOB-checkout-checkout-network
|
||||||
|
```
|
||||||
|
|
||||||
|
- If you wish to run the action locally with a self-hosted runner that runs directly on the host, use the following instead:
|
||||||
|
|
||||||
|
```
|
||||||
|
./act_runner exec --workflows workflows/checkout.yml -i -self-hosted
|
||||||
|
```
|
||||||
|
|
||||||
|
## How workflows are used in Phyllome OS
|
||||||
|
|
||||||
|
Several known actions repositories are mirrored within Phyllome's Gitea instance, under the [actions](https://git.phyllo.me/actions) organization.
|
||||||
|
|
||||||
|
# Good resources
|
||||||
|
|
||||||
|
- [Official Gitea Action documentation](https://docs.gitea.com/usage/actions/quickstart)
|
||||||
|
- [Awesome Actions](https://github.com/sdras/awesome-actions#workflow-examples)
|
||||||
|
- [GitHub Actions Survival Skills](https://thekevinwang.com/2022/06/13/github-actions-survival-skills)
|
||||||
15
workflows/checkout.yml
Normal file
15
workflows/checkout.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
name: checkout
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
checkout:
|
||||||
|
runs-on: ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: https://git.phyllo.me/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
16
workflows/docker-in-docker.yml
Normal file
16
workflows/docker-in-docker.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
name: checkout
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
checkout:
|
||||||
|
runs-on: ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: git.phyllo.me/roots/fedora-iso-creation:42
|
||||||
|
steps:
|
||||||
|
- uses: https://git.phyllo.me/actions/checkout@v4
|
||||||
|
- name: Setup tmate session
|
||||||
|
- uses: https://github.com/mxschmitt/action-tmate@v3
|
||||||
16
workflows/fedora-checkout.yml
Normal file
16
workflows/fedora-checkout.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
name: checkout
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main # Or your desired branch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
checkout:
|
||||||
|
runs-on: fedora-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: https://git.phyllo.me/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
23
workflows/list-files-and-path.yml
Normal file
23
workflows/list-files-and-path.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Echo Current Path and List Files
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main # Or your desired branch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
echo-path:
|
||||||
|
runs-on: ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: https://git.phyllo.me/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
steps:
|
||||||
|
- name: Echo Current Path
|
||||||
|
run: |
|
||||||
|
pwd
|
||||||
|
echo "Current working directory:"
|
||||||
|
- name: List Files
|
||||||
|
run: |
|
||||||
|
ls -la
|
||||||
|
echo "Files in current directory:"
|
||||||
21
workflows/release-tag.yml
Normal file
21
workflows/release-tag.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
name: release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: https://git.phyllo.me/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: https://git.phyllo.me/actions/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
bin/**
|
||||||
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user