diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml deleted file mode 100644 index 7507c21..0000000 --- a/.github/workflows/build-and-test.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Build and Test - -on: - push: - branches: - - develop - - feature* - pull_request: - types: [ opened, synchronize, reopened ] - -jobs: - - mvn-sonar: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4.5.0 - with: - java-version: '17' - distribution: 'corretto' - - name: Cache maven repository - uses: actions/cache@v4.2.0 - with: - path: ~/.m2/repository - key: maven - restore-keys: maven - - name: Build with Maven verify for sonar - env: - API_EMAIL: ${{ secrets.API_EMAIL }} - API_KEY: ${{ secrets.API_KEY }} - API_TOKEN: ${{ secrets.API_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=th-schwarz_CloudflareDNS-java \ No newline at end of file diff --git a/.github/workflows/clone-gitlab.yml b/.github/workflows/clone-gitlab.yml new file mode 100644 index 0000000..f70f7e4 --- /dev/null +++ b/.github/workflows/clone-gitlab.yml @@ -0,0 +1,20 @@ +name: Clone GitLab Repository Daily + +# Schedule the workflow to run daily at midnight +on: + schedule: + - cron: '0 0 * * *' # Adjust the cron schedule as required (UTC) + +jobs: + clone-gitlab-repo: + name: Clone GitLab Repository + runs-on: ubuntu-latest + + steps: + - name: Clone GitLab repository + env: + # Set the GitLab access token in GitHub secrets as `GITLAB_TOKEN` + GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} + run: | + # Authenticate using GitLab token + git clone https://gitlab-ci-token:${GITLAB_TOKEN}@thischwa/CloudflareDNS-java.git cloned-repo