fix: new workflow

This commit is contained in:
2025-10-10 14:46:08 +02:00
parent 2f9821ecf8
commit d567e28659
2 changed files with 32 additions and 20 deletions

View File

@@ -14,14 +14,24 @@ env:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults:
run:
working-directory: ./Projects/kompose
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Sync Respository with:
path: home
- uses: actions/checkout@v4
with:
repository: valknarogg/kompose
path: kompose
- name: Commit and push changes (if any)
shell: bash
env:
CI_COMMIT_MESSAGE: "repo: update kompose"
CI_COMMIT_AUTHOR: "technitz[bot]@valknar/kompose
CI_COMMIT_EMAIL: admin@pivoine.art
run: | run: |
mkdir -p ~/.ssh/ cd kompose
ssh-keyscan host.docker.internal --port=2222 >> ~/.ssh/known_hosts git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
${{ github.workspace }}/.init/bin/mirror_project.sh $SYNC_TARGET '${{ github.event.head_commit.message }}' ${{ runner.temp }}/kompose git config --global user.email "${{ env.CI_COMMIT_EMAIL }}"
${{ github.workspace }}/.init/bin/mirror_project.sh '${{ github.event.head_commit.message }}' ../home

View File

@@ -1,16 +1,18 @@
#!/bin/bash #!/bin/bash
TMP_PROJECT="$3" TMP_PROJECT="$PWD"
RELATIVE_HOME="$TMP_PROJECT"
CURRENT_PROJECT="${s##*/}"
git config --global user.email "valknar@pivoine.art" if [[ `git status --porcelain --untracked-files=no` ]]; then
git config --global user.name "Sebastian Krüger" # Changes
cp -rf $RELATIVE_HOME/Projects/kompose/* $TMP_PROJECT
mkdir "$TMP_PROJECT" rm -rf $TMP_PROJECT/.env $TMP_PROJECT/**/uploads/ $TMP_PROJECT/**/*.sql $TMP_PROJECT/**/*.pem
git clone "$1" "$TMP_PROJECT" git add -A
cp -rf ./* "$TMP_PROJECT" git commit -m "$1"
cd "$TMP_PROJECT" git push
rm -rf ./.env **/uploads/ ./**/*.sql ./**/*.pem else
git add -A # No changes
git commit -m "$2" echo "no changes to latest posts"
git push exit 0
cd - fi