Skip to content

Commit

Permalink
build only on main and PRs (#4)
Browse files Browse the repository at this point in the history
Co-authored-by: cultivator[bot] <343217+cultivator[bot]@users.noreply.github.com>
  • Loading branch information
akerl-cultivator[bot] and cultivator[bot] committed Jul 5, 2023
1 parent b5a7b3e commit d456c65
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/build.yml
@@ -1,7 +1,12 @@
---
name: Build
on:
pull_request:
'on':
push:
branches:
- main
tags:
- "**"
pull_request_target:
jobs:
build:
name: Build
Expand All @@ -12,7 +17,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
ref: "${{ github.ref_name }}"
fetch-depth: 0
submodules: recursive
- uses: ruby/setup-ruby@v1
Expand All @@ -22,16 +27,16 @@ jobs:
- name: Build
run: bundle exec rake
- name: Release
if: ${{ github.ref == 'refs/heads/main' }}
if: "${{ github.ref == 'refs/heads/main' }}"
run: |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config --global user.name 'GitHub Actions'
bundle exec rake release
env:
BLACKSMITH_FORGE_API_KEY: ${{ secrets.BLACKSMITH_FORGE_API_KEY }}
BLACKSMITH_FORGE_API_KEY: "${{ secrets.BLACKSMITH_FORGE_API_KEY }}"
- name: Post to hook-exporter
run: ./.github/exporter.sh
run: "./.github/exporter.sh"
env:
EXPORTER_TOKEN: ${{ secrets.EXPORTER_TOKEN }}
JOB_STATUS: ${{ job.status }}
if: ${{ always() }}
EXPORTER_TOKEN: "${{ secrets.EXPORTER_TOKEN }}"
JOB_STATUS: "${{ job.status }}"
if: "${{ always() }}"

0 comments on commit d456c65

Please sign in to comment.