Skip to content

Merge pull request 'fix(cloud-init): remove license header for cloud-… #70

Merge pull request 'fix(cloud-init): remove license header for cloud-…

Merge pull request 'fix(cloud-init): remove license header for cloud-… #70

# Copyright 2026 Schwarz Digits Cloud GmbH & Co. KG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "Mirror to Public GitHub"
on:
push:
branches:
- main
jobs:
sync-to-github:
name: "Sync Repository"
if: github.server_url == 'https://professional-service.git.onstackit.cloud'
runs-on: "stackit-ubuntu-22"
steps:
- name: Checkout Code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup SSH Key
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
run: |
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
- name: Push to Public Repo
run: |
echo "Setting up remote..."
git config --global user.name "ps-sync-bot"
git config --global user.email "ps-sync-bot@digits.schwarz"
# Add the GitHub remote using the SSH protocol
git remote add public git@github.com:stackitcloud/professional-service.git
echo "Pushing main branch to GitHub..."
git push public main --force
echo "Pushing tags to GitHub..."
git push public --tags --force