Update more workflows to only this repository (#4062)
* Update more workflows to only this repository This adds `if: github.repository == 'bytecodealliance/wasmtime'` to a few more workflows related to the release process which should only run in this repository and no other (e.g. forks). * Also only run verify-publish in the upstream repo No need for local deelopment to be burdened with ensuring everything is actually publish-able, that's just a concern for the main repository. * Gate workflows which need secrets on this repository
This commit is contained in:
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
@@ -113,7 +113,7 @@ jobs:
|
|||||||
GITHUB_DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
|
GITHUB_DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
|
||||||
BUILD_REPOSITORY_ID: ${{ github.repository }}
|
BUILD_REPOSITORY_ID: ${{ github.repository }}
|
||||||
BUILD_SOURCEVERSION: ${{ github.sha }}
|
BUILD_SOURCEVERSION: ${{ github.sha }}
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'bytecodealliance/wasmtime'
|
||||||
|
|
||||||
# Quick checks of various feature combinations and whether things
|
# Quick checks of various feature combinations and whether things
|
||||||
# compile. The goal here isn't to run tests, mostly just serve as a
|
# compile. The goal here isn't to run tests, mostly just serve as a
|
||||||
@@ -440,13 +440,14 @@ jobs:
|
|||||||
- run: cd .github/actions/github-release && npm install --production
|
- run: cd .github/actions/github-release && npm install --production
|
||||||
- name: Publish Release
|
- name: Publish Release
|
||||||
uses: ./.github/actions/github-release
|
uses: ./.github/actions/github-release
|
||||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.repository == 'bytecodealliance/wasmtime'
|
||||||
with:
|
with:
|
||||||
files: "dist/*"
|
files: "dist/*"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
verify-publish:
|
verify-publish:
|
||||||
|
if: github.repository == 'bytecodealliance/wasmtime'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|||||||
1
.github/workflows/publish-to-cratesio.yml
vendored
1
.github/workflows/publish-to-cratesio.yml
vendored
@@ -11,6 +11,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
|
if: github.repository == 'bytecodealliance/wasmtime'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|||||||
1
.github/workflows/push-tag.yml
vendored
1
.github/workflows/push-tag.yml
vendored
@@ -14,6 +14,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push_tag:
|
push_tag:
|
||||||
|
if: github.repository == 'bytecodealliance/wasmtime'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|||||||
1
.github/workflows/release-process.yml
vendored
1
.github/workflows/release-process.yml
vendored
@@ -34,6 +34,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release_process:
|
release_process:
|
||||||
|
if: github.repository == 'bytecodealliance/wasmtime'
|
||||||
name: Run the release process
|
name: Run the release process
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user