Skip to content

Commit

Permalink
Refactoring GHA workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
fao89 committed Mar 27, 2020
1 parent c479291 commit b0b768d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 88 deletions.
88 changes: 0 additions & 88 deletions .github/workflows/ci.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/cron.yml → .github/workflows/pulp_ci.yml
Expand Up @@ -7,6 +7,14 @@
---
name: Pulp CI
on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
branches:
- '*'
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '15 1 * * *'
Expand All @@ -26,6 +34,8 @@ jobs:
image: redis
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
Expand All @@ -36,6 +46,23 @@ jobs:
sudo apt-get update -yq
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie
echo ::endgroup::
- name: Check commit message
if: github.event_name == 'pull_request'
env:
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
run: |
echo ::group::REQUESTS
pip install requests
echo ::endgroup::
for sha in $(curl $GITHUB_CONTEXT | jq '.[].sha' | sed 's/"//g')
do
python .github/validate_commit_message.py $sha
VALUE=$?
if [ "$VALUE" -gt 0 ]; then
exit $VALUE
fi
done
shell: bash
- name: Before Install
run: |
.github/before_install.sh
Expand Down Expand Up @@ -70,6 +97,7 @@ jobs:
sudo kubectl logs -l app=pulp-resource-manager --tail=10000
sudo kubectl logs -l app=pulp-worker --tail=10000
deploy:
if: github.event_name != 'pull_request'
needs: pulp
runs-on: ubuntu-latest
services:
Expand Down
2 changes: 2 additions & 0 deletions README.md
@@ -1,3 +1,5 @@
![Pulp CI](https://github.com/pulp/pulp_npm/workflows/Pulp%20CI/badge.svg)

# pulp-npm

A Pulp plugin to support hosting your own npm.
Expand Down

0 comments on commit b0b768d

Please sign in to comment.