Skip to content

Instantly share code, notes, and snippets.

@pmanlukas
Last active November 20, 2019 10:38
Show Gist options
  • Save pmanlukas/7cd7c500b9a6f2601fe5e6a04988bb26 to your computer and use it in GitHub Desktop.
Save pmanlukas/7cd7c500b9a6f2601fe5e6a04988bb26 to your computer and use it in GitHub Desktop.
Use Drone CLI to convert a .gitlab-ci.yml to drone.yml

Prototype for running GitLab CI within GitHub Actions with Drone.io

Currently this is work in progress

Step 1: Convert GitLab CI file to drone:

  • Install the drone cli on your local machine
  • cd to the folder with the .gitlab-ci.yml file and run the above script

Now you got a .drone.yml file, that can be run by drone.io

Step 2: Setup Action for executing the .drone.yml file

tbd.

Step 3: Setup workflow in Actions

tbd.

#!/bin/bash
while true; do
read -p "Do you wish to convert your gitlab files?" yn
case $yn in
[Yy]* ) drone convert .gitlab-ci.yml &> .drone.yml; echo "conversion saved to .drone.yml file"; exit;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment