Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: github actions, add auto gem publish #29

Merged
merged 4 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 36 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
name: Tests
name: CI

on:
push:
branches:
- master
- main
pull_request: {}

jobs:
lint:
name: "pups lint"
runs-on: ${{ matrix.os }}
timeout-minutes: 5

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
ruby: ["3.2"]

steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rubocop
test:
name: "pups tests"
runs-on: ${{ matrix.os }}
Expand All @@ -19,11 +37,26 @@ jobs:
ruby: ["3.2"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run minitest
run: |
rake test

publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [test]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Release Gem
uses: discourse/publish-rubygems-action@v2
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
GIT_EMAIL: team@discourse.org
GIT_NAME: discoursebot
27 changes: 0 additions & 27 deletions .github/workflows/lint.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Running: `pups somefile.yaml` will execute the shell script resulting in a file

#### Filtering run commands by tags

The `--tags` and `skip-tags` argument allows pups to target a subset of commands listed in the somefile.yaml. To use this, you may tag your commands in the rublock. `--tags` will only run commands when commands have a matching tag. `skip-tags` will skip when commands have a matching tag.
The `--tags` and `--skip-tags` argument allows pups to target a subset of commands listed in the somefile.yaml. To use this, you may tag your commands in the runblock. `--tags` will only run commands when commands have a matching tag. `--skip-tags` will skip when commands have a matching tag.

Note, hooks from tagged commands will be present or absent depending on if the tag is filtered out or not as well. A command filtered out by targeting tag will also filter out the command's `before_` and `after_` hooks.

Expand Down