Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
69972fa692 |
|||
|
d1d2001ae9 |
|||
|
9f0af185b8 |
|||
|
e5d8ef695f |
2 changed files with 38 additions and 4 deletions
24
.gitea/workflows/demo.yaml
Normal file
24
.gitea/workflows/demo.yaml
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
name: Gitea Actions Demo
|
||||||
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||||
|
on: [ push ]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: fz
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: docker/medatada-action@3
|
||||||
|
id: medatada
|
||||||
|
with:
|
||||||
|
images: git.roboces.dev/${{ gitea.repository }}
|
||||||
|
- uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.roboces.dev
|
||||||
|
username: ${{ gitea.actor }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
- uses: int128/kaniko-action@v1
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.metadata.outputs.tags }}
|
||||||
|
labels: ${{ steps.metadata.outputs.labels }}
|
||||||
|
cache: true
|
||||||
|
cache-repository: gitea.roboces.dev/${{ gitea.repository }}/cache
|
||||||
|
|
@ -15,10 +15,20 @@ class Group(BaseModel):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def pair(names: list[str]) -> dict[str, str]:
|
def pair(names: list[str]) -> dict[str, str]:
|
||||||
random.shuffle(names)
|
names_copy = names[:]
|
||||||
names_copy = names[1:]
|
random.shuffle(names_copy)
|
||||||
names_copy.append(names[0])
|
|
||||||
return dict(zip(names, names_copy))
|
pairings = {}
|
||||||
|
for i, name in enumerate(names):
|
||||||
|
pair = names_copy[i]
|
||||||
|
while pair == name:
|
||||||
|
random.shuffle(names_copy)
|
||||||
|
pair = names_copy[i]
|
||||||
|
|
||||||
|
pairings[name] = pair
|
||||||
|
|
||||||
|
return pairings
|
||||||
|
|
||||||
|
|
||||||
class IRepo(ABC):
|
class IRepo(ABC):
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue