Skip to content

feat: Cl/ci3.3

feat: Cl/ci3.3 #526

Workflow file for this run

name: CI3
on:
workflow_dispatch:
# push:
# branches:
# - master
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- labeled
concurrency:
# force parallelism in master
group: ci3-${{ github.ref_name == 'master' && github.run_id || github.ref_name }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest
if: >
(github.event.action != 'labeled' && github.event.pull_request.draft == false) ||
(github.event.action == 'labeled' && github.event.label.name == 'trigger-workflow')
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Ensure it is not an artificial merge commit
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup
run: |
# Ensure we can SSH into the spot instances we request
mkdir -p ~/.ssh
echo ${{ secrets.BUILD_INSTANCE_SSH_KEY }} | base64 --decode > ~/.ssh/build_instance_key
chmod 600 ~/.ssh/build_instance_key
- name: Run
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
BRANCH=${{ github.event.pull_request.head.ref || github.ref_name }} ./ci.sh ec2