Compare commits

..

8 Commits

Author SHA1 Message Date
Leo
f290cbbe47 feat: added empty files for sheet1 2026-04-21 11:36:08 +02:00
Leo
e9c39073be chore: reset repo 2026-04-21 11:33:20 +02:00
Leo
43649543e2 rename dir
All checks were successful
zip and release / build-and-release (push) Successful in 4s
2026-04-21 11:23:53 +02:00
Leo
76ec3d0a13 Test 2026-04-21 11:21:45 +02:00
Leo
878029e8a1 test pipeline
Some checks failed
zip and release / build-and-release (push) Failing after 3s
2026-04-21 11:21:12 +02:00
Leo
066e218727 feat: add pipeline 2026-04-21 11:19:01 +02:00
Leo
048dc6cddd feat: ignore pdf + update readme 2026-04-21 11:11:44 +02:00
Leo
c190713085 feat: add gitignore 2026-04-21 10:56:29 +02:00
8 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
name: zip and release
on:
push:
tags:
- '*-submission'
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: get sheet folder name
id: vars
run: |
# Takes 'sheet01-submission' and extracts just 'sheet01'
TAG_NAME="${{ github.ref_name }}"
SHEET_NAME="${TAG_NAME%-submission}"
echo "sheet_name=$SHEET_NAME" >> $GITHUB_OUTPUT
- name: create zip file
run: |
SHEET_NAME="${{ steps.vars.outputs.sheet_name }}"
if [ ! -d "$SHEET_NAME" ]; then
echo "Error: Directory $SHEET_NAME does not exist."
exit 1
fi
cd "$SHEET_NAME"
zip -r "../${SHEET_NAME}.zip" .
cd ..
- name: release zip
uses: softprops/action-gh-release@v2
with:
name: "Submission: ${{ steps.vars.outputs.sheet_name }}"
files: "${{ steps.vars.outputs.sheet_name }}.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.pdf

View File

@@ -0,0 +1,31 @@
# IT-Security Excercise Sheets
```
it-sec-repo/
├── .gitea/
│ └── workflows/
│ └── create-zip.yaml
├── .gitignore
├── sheet01/
│ ├── a1/
│ │ └── somefile.md
│ ├── a2/
│ │ ├── somefile.java
│ ... ...
├── sheet02/
│ ├── a1/
│ ...
```
## Submissions
- add the tag `sheetXX-submission` to the git commit where sheetXX is the directory containing the submission
```
git tag sheetXX-submission
git push origin sheetXX-submission
```
- push that submission commit to the main branch
- the pipeline will create the zip file with the submission and release it
#### Removing tags
- delete the tag from the remote through the UI or `git push --delete origin tagName`
- delete the tag locally `git tag -d tagName`
- delete the release in the gitea UI

0
sheet01/a1/overview.md Normal file
View File

0
sheet01/a2/b.txt Normal file
View File

0
sheet01/a2/c.txt Normal file
View File

0
sheet01/a2/d.txt Normal file
View File

0
sheet01/a2/plaintext.txt Normal file
View File