Skip to content

Commit

Permalink
Merge pull request #1109 from theCalcaholic/feature/gitlab-ci-integra…
Browse files Browse the repository at this point in the history
…tion

Feature/gitlab ci integration
  • Loading branch information
theCalcaholic authored Mar 21, 2020
2 parents ecc6076 + 0e79ee1 commit fab416c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/mirror-to-gitlab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This is a basic workflow to help you get started with Actions

name: Push to Gitlab

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches-ignore: []
pull_request:
branches: [ master, devel ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
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@v2

# Runs a single command using the runners shell
- name: Push to gitlab
env:
GITLAB_DEPLOY_KEY: ${{ secrets.GITLAB_DEPLOY_KEY }}
run: |
set -xe
mkdir -p ~/.ssh
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
echo "${GITLAB_DEPLOY_KEY}" > ~/.ssh/id_ed25519
chmod 0600 ~/.ssh/id_ed25519
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
git remote add gitlab [email protected]:ncp-ci-bot/nextcloudpi-playground.git
# git push gitlab $GITHUB_REF
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ stages:
services:
- docker:dind
script:
- [[ "${ARCHITECTURE?}" == "armhf" ]] && QEMU_ARCH="arm" || true
- [[ "${ARCHITECTURE?}" == "arm64" ]] && QEMU_ARCH="aarch64" || true
- '[[ "${ARCHITECTURE?}" == "armhf" ]] && QEMU_ARCH="arm" || true'
- '[[ "${ARCHITECTURE?}" == "arm64" ]] && QEMU_ARCH="aarch64" || true'
- |
docker build --progress=plain . -f - -t "${CI_REGISTRY_IMAGE}/ncp-testing-${ARCHITECTURE?}:${CI_PIPELINE_IID}" <<-EOF
FROM ${CI_REGISTRY_IMAGE}/nextcloudpi-${ARCHITECTURE?}:${CI_PIPELINE_IID}";
Expand Down

0 comments on commit fab416c

Please sign in to comment.