name: CI | Publish gitlab repository package

on: [push]

jobs:
  pwa-microservices-template:
    if: github.repository == 'underpostnet/pwa-microservices-template'
    name: Update gitlab repo package Jobs
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0

      - name: Push to GitLab
        run: |
          git remote add gitlab https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.com/underpost/pwa-microservices-template.git
          git config user.name 'underpostnet'
          git config user.email 'development@underpost.net'
          git push gitlab HEAD:main --force
          git push gitlab --force --tags
