Compare commits

..

5 Commits

Author SHA1 Message Date
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
5 changed files with 70 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,25 @@
# 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
```
- push that submission commit to the main branch
- the pipeline will create the zip file with the submission and release it

1
sheet1/test.md Normal file
View File

@@ -0,0 +1 @@
stuff

View File

@@ -0,0 +1 @@
sdfsd