When running the action-release Github Action, occasionally one might need to perform auto-detection of associated commits in a directory other than the job's working directory, such as in the case where an action performs multiple checkouts. As Github Actions do not, by default, support the ability to run an action in any directory other than the job's working directory, this change implements an argument for specifying which directory to gather sentry release information from.
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
name: "test"
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
mock-release: # Make sure that the action works on a clean machine without building
|
|
name: "Build image & mock a release"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: './.github/actions/use-local-dockerfile'
|
|
|
|
- name: Mock creating a Sentry release
|
|
uses: ./
|
|
env:
|
|
MOCK: true
|
|
with:
|
|
environment: production
|
|
|
|
mock-release-working-directory:
|
|
name: "Build image & mock a release in a different working directory"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout directory we'll be running from
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: main/
|
|
|
|
- name: Checkout directory we'll be testing
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: test/
|
|
|
|
- uses: './main/.github/actions/use-local-dockerfile'
|
|
with:
|
|
working_directory: main
|
|
|
|
- name: Mock creating a Sentry release in a different directory
|
|
uses: ./main
|
|
env:
|
|
MOCK: true
|
|
with:
|
|
environment: production
|
|
working_directory: ./test
|