Skip to content

Commit

Permalink
[chore] don't publish from forks (#346)
Browse files Browse the repository at this point in the history
fixes #345
  • Loading branch information
rotty3000 authored Nov 17, 2024
1 parent 897f666 commit 19cda4c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cargo_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
changed_relative_to_ref: origin/${{ github.base_ref || 'not-a-branch' }}

cargo_publish:
if: github.repository == 'tembo-io/pgmq'
# On a pull request, this is validating that the version
# is not already published to crates.io, and on a push to
# main or release branches, it is publishing if the version
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- ".github/workflows/docs.yml"
jobs:
deploy:
if: github.repository == 'tembo-io/pgmq'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/extension_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
- run: pg-build-test

publish:
if: github.repository == 'tembo-io/pgmq'
name: trunk publish
runs-on: ubuntu-22.04
strategy:
Expand Down Expand Up @@ -87,6 +88,7 @@ jobs:
pgmq_repo=$(stoml Trunk.toml extension.repository)
trunk publish pgmq --version ${pgmq_ver} --description "A lightweight message queue. Like AWS SQS and RSMQ, on Postgres." --homepage "https://github.com/tembo-io/pgmq" --repository "https://github.com/tembo-io/pgmq" --license "PostgreSQL" --category featured --category orchestration
build_and_push:
if: github.repository == 'tembo-io/pgmq'
name: Build and push images
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pgmq_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
publish:
runs-on: ubuntu-latest
# only publish off main branch
if: github.ref == 'refs/heads/main'
if: github.repository == 'tembo-io/pgmq' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11.0
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/pgxn-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ on:
tags: ['v[0-9]+.[0-9]+.[0-9]+']
jobs:
release:
if: github.repository == 'tembo-io/pgmq'
name: Release on PGXN
runs-on: ubuntu-latest
container: pgxn/pgxn-tools
defaults:
run:
working-directory: ./pgmq-extension
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Bundle the Release
run: make dist
- name: Release on PGXN
env:
PGXN_USERNAME: ${{ secrets.PGXN_USERNAME }}
PGXN_PASSWORD: ${{ secrets.PGXN_PASSWORD }}
run: pgxn-release
- name: Check out the repo
uses: actions/checkout@v4
- name: Bundle the Release
run: make dist
- name: Release on PGXN
env:
PGXN_USERNAME: ${{ secrets.PGXN_USERNAME }}
PGXN_PASSWORD: ${{ secrets.PGXN_PASSWORD }}
run: pgxn-release

0 comments on commit 19cda4c

Please sign in to comment.