Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIRE-248 Fix CD GitHub Actions #15

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/gitlab-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This is a workflow that syncs everthing on this repository to another repository
# using GitLab Token

name: Sync GitHub to GitLab

on:
push:
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
push-to-gitlab:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all tags and branches

- name: Print commit author
run: |
echo ${{ github.actor }}

- name: Set remote repository (071yoon)
if: ${{ github.actor == '071yoon' }}
env:
gitlab_url: ${{ secrets.TARGET_URL }}
gitlab_username: ${{ secrets.TARGET_USERNAME }}
gitlab_token: ${{ secrets.TARGET_TOKEN }}
run: |
git remote add gitlab https://${gitlab_username}:${gitlab_token}@${gitlab_url#https://};

- name: Set remote repository (haryung-lee)
if: ${{ github.actor == 'haryung-lee' }}
env:
gitlab_url: ${{ secrets.TARGET_URL }}
gitlab_username: ${{ secrets.TARGET_USERNAME_HALANG }}
gitlab_token: ${{ secrets.TARGET_TOKEN_HALANG }}
run: |
git remote add gitlab https://${gitlab_username}:${gitlab_token}@${gitlab_url#https://};

- name: Set remote repository (IamGroooooot)
if: ${{ github.actor == 'IamGroooooot' }}
env:
gitlab_url: ${{ secrets.TARGET_URL }}
gitlab_username: ${{ secrets.TARGET_USERNAME_JUHYEONG }}
gitlab_token: ${{ secrets.TARGET_TOKEN_JUHYEONG }}
run: |
git remote add gitlab https://${gitlab_username}:${gitlab_token}@${gitlab_url#https://};

- name: Force push everthing
run: |
git push -f --all gitlab;
git push -f --tags gitlab;
35 changes: 0 additions & 35 deletions .github/workflows/gitlab-ci.yml

This file was deleted.