Compare commits
8 Commits
27bd262187
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f290cbbe47 | ||
|
|
e9c39073be | ||
|
|
43649543e2 | ||
|
|
76ec3d0a13 | ||
|
|
878029e8a1 | ||
|
|
066e218727 | ||
|
|
048dc6cddd | ||
|
|
c190713085 |
42
.gitea/workflows/create-zip.yaml
Normal file
42
.gitea/workflows/create-zip.yaml
Normal 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
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.pdf
|
||||||
31
README.md
31
README.md
@@ -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
0
sheet01/a1/overview.md
Normal file
0
sheet01/a2/b.txt
Normal file
0
sheet01/a2/b.txt
Normal file
0
sheet01/a2/c.txt
Normal file
0
sheet01/a2/c.txt
Normal file
0
sheet01/a2/d.txt
Normal file
0
sheet01/a2/d.txt
Normal file
0
sheet01/a2/plaintext.txt
Normal file
0
sheet01/a2/plaintext.txt
Normal file
Reference in New Issue
Block a user