Skip to content

add ubuntu support (#12) #38

add ubuntu support (#12)

add ubuntu support (#12) #38

Workflow file for this run

name: gitlab-sync
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- synchronize
permissions:
contents: read
jobs:
sync:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}
env:
GITLAB_ACCESS_TOKEN: ${{ secrets.GITLAB_ACCESS_TOKEN }}
GITLAB_PROJECT_ID: ${{ vars.GITLAB_PROJECT_ID }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure git
run: |
git remote add gitlab https://gitlab-ci-token:${GITLAB_ACCESS_TOKEN}@gitlab.com/boostsecurityio/boostsec-scanner-gitlab.git
- name: Synchronize gitlab branch
run: |
git push --force gitlab HEAD:refs/heads/${BRANCH_NAME}
sleep 10
- name: Create merge request
run: |
.github/scripts/gitlab create
- name: Waiting for pipeline
run: |
.github/scripts/gitlab poll
- name: Cleaning up
if: always()
run: |
.github/scripts/gitlab delete || true
git push --delete gitlab ${BRANCH_NAME} || true