Skip to content

Commit

Permalink
Merge pull request f4pga#1742 from umarcor/ci/skip
Browse files Browse the repository at this point in the history
ci/check-status: set-output name=skip
  • Loading branch information
mithro committed Nov 1, 2020
2 parents 751c12e + 1bbf48d commit 2a8e22f
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/checkstatus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,41 @@ on:
status:

jobs:

Check-statuses:
runs-on: ubuntu-latest

steps:

- name: Check status
run: |
curl -s --url https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.sha }}/status \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | head -n 2 | tail -n 1 | grep "success"
id: check
run: >-
curl -fsSL
-H 'Accept: application/vnd.github.v3+json'
-H 'authorization: Bearer ${{ github.token }}'
https://api.github.com/repos/${{ github.repository }}/commits/${{ github.event.sha }}/status
| head -n 2
| tail -n 1
| grep "success"
|| echo '::set-output name=skip::true'
- name: Set up Python
if: steps.check.outputs.skip != 'true'
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install STDM
if: steps.check.outputs.skip != 'true'
run: pip install git+https://github.com/SymbiFlow/symbiflow-tools-data-manager#egg=stdm

- name: Get latest artifact name
if: steps.check.outputs.skip != 'true'
run: mkdir install && symbiflow_get_latest_artifact_url > install/latest

- name: Upload artifact URL file
if: steps.check.outputs.skip != 'true'
uses: weslenng/gcp-storage-sync@master
env:
GCP_SERVICE_ACCOUNT_KEY_FILE: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY_FILE }}
GCP_STORAGE_BUCKET: ${{ secrets.GCP_STORAGE_BUCKET }}
GCP_SERVICE_ACCOUNT_KEY_FILE: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY_FILE }}
GCP_STORAGE_BUCKET: ${{ secrets.GCP_STORAGE_BUCKET }}
SOURCE_DIR: "install"

0 comments on commit 2a8e22f

Please sign in to comment.