diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml deleted file mode 100644 index b2c57cb0d..000000000 --- a/.github/workflows/action.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Gitlab Sync" -author: "action-pack" -description: "Action to mirror a repository to GitLab." - -branding: - icon: "copy" - color: "gray-dark" - -inputs: - url: - description: "GitLab repo URL" - required: true - username: - description: "GitLab username" - required: true - token: - description: "GitLab token" - required: true -runs: - using: "composite" - steps: - - run: ${{ github.action_path }}/entrypoint.sh - shell: bash - env: - INPUT_TARGET_URL: ${{ inputs.url }} - INPUT_TARGET_TOKEN: ${{ inputs.token }} - INPUT_TARGET_USERNAME: ${{ inputs.username }} - GITHUB_EVENT_REF: ${{ github.event.ref }} diff --git a/.github/workflows/mirror-example.yml b/.github/workflows/mirror-example.yml index a4ed49b0c..db5b04bba 100644 --- a/.github/workflows/mirror-example.yml +++ b/.github/workflows/mirror-example.yml @@ -1,18 +1,21 @@ -name: Gitlab Sync +name: Mirror and run GitLab CI -on: [push, pull_request, create, delete] +on: [push] jobs: - sync: - name: Gitlab Sync + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: action-pack/gitlab-sync@v3 - with: - username: ${{ github.actor }} - url: https://gitlab.com/${{ github.repository }}.git - # Personal access token from gitlab.com - token: ${{ secrets.MIRROR_TRY_ME_TOKEN }} + - uses: actions/checkout@v1 + - name: Mirror + trigger CI + uses: SvanBoxel/gitlab-mirror-and-ci-action@master + with: + args: "https://gitlab.com/hadithmv/hadithmv.github.io" + env: + FOLLOW_TAGS: "false" + FORCE_PUSH: "false" + GITLAB_HOSTNAME: "gitlab.com" + GITLAB_USERNAME: "hadithmv" + GITLAB_PASSWORD: ${{ secrets.MIRROR_TRY_ME_TOKEN }} + GITLAB_PROJECT_ID: "https://gitlab.com/hadithmv/hadithmv.github.io/edit" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}