Skip to content

Commit

Permalink
fix(ci): Refactor the CI system to use custom Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Jul 30, 2021
1 parent 088bb7a commit 6844320
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 64 deletions.
32 changes: 0 additions & 32 deletions .dependabot/config.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/ci.yaml
Expand Up @@ -64,6 +64,20 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
- name: sleep for 10 minutes for PyPI update
if: contains(steps.new_release.outputs.tag, '.')
run: sleep 600s
shell: bash
- name: Update dragonfly-core
if: contains(steps.new_release.outputs.tag, '.')
env:
DISPATCH_REPO: ladybug-tools/dragonfly-core
DEPS_TOKEN: ${{ secrets.DEPS_UPDATING }}
run: |
curl -X POST https://api.github.com/repos/$DISPATCH_REPO/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-d '{"event_type": "dragonfly_schema_release", "client_payload": {"version": "${{ steps.new_release.outputs.tag }}"}}' \
-u ladybugbot:$DEPS_TOKEN
outputs:
tag: ${{ steps.new_release.outputs.tag }}

Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/dependency-release.yaml
@@ -0,0 +1,32 @@
name: CI-On-Dispatch

on: repository_dispatch

jobs:

bump_honeybee_schema:
name: "Check Event"
runs-on: ubuntu-latest
if: github.event.action == 'honeybee_schema_release'
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: refs/heads/master
token: ${{ secrets.DEPS_UPDATING }}
- name: "Run Update Script"
env:
VERSION: ${{ github.event.client_payload.version }}
run: |
export CLEAN_VERSION=$(echo $VERSION | sed 's/v//g')
sed -i --regexp-extended 's/(honeybee-schema==).*/honeybee-schema=='"$CLEAN_VERSION"'/' requirements.txt
- name: "Commit and Push Changes"
id: push
env:
VERSION: ${{ github.event.client_payload.version }}
run: |
git config --global user.name 'ladybugbot'
git config --global user.email 'ladybugbot@users.noreply.github.com'
git add .
git commit -m "fix(deps): Bump honeybee-schema to $VERSION"
git push
32 changes: 0 additions & 32 deletions .github/workflows/emit-release-event.yaml

This file was deleted.

0 comments on commit 6844320

Please sign in to comment.