当我将更改推送到我的GitHub PR (它的GitHubActions设置为触发EAS构建)时,有时我会看到与development-internal
配置文件重复的构建。
我可以看到它是相同的提交哈希:
我们正在进行:
Workflow
eas-cli
版本:eas-version: latest
这是eas.config
{
"build": {
"staging": {
"node": "16.15.0",
"yarn": "1.22.5",
"env": {
"API_ADDRESS": "ourURL",
"LOG_API_ERRORS": "true",
"GOOGLE_PLACES_API_KEY": "ourKey"
},
"ios": {
"env": {
"PLATFORM": "ios"
}
}
},
"prod": {
"node": "16.15.0",
"yarn": "1.22.5",
"env": {
"API_ADDRESS": "ourURL",
"LOG_API_ERRORS": "true",
"GOOGLE_PLACES_API_KEY": "ourKey"
},
"ios": {
"env": {
"PLATFORM": "ios"
}
}
},
"release": {},
"prod-internal": {
"extends": "prod",
"releaseChannel": "prod-internal",
"distribution": "internal"
},
"development-internal": {
"extends": "staging",
"distribution": "internal"
},
"development-simulator": {
"extends": "prod",
"ios": {
"releaseChannel": "development-simulator",
"simulator": true
}
},
"development": {
"extends": "staging",
"developmentClient": true,
"distribution": "internal",
"ios": {
"simulator": true
}
}
}
}
以及我们的GitHub工作流ci.yml
name: CI
on:
workflow_dispatch:
pull_request:
types: [labeled, opened, synchronize]
branches:
- develop
jobs:
typescript:
name: Compile Typescript
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub Repo
uses: actions/checkout@v3
- name: Set Up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
registry-url: https://registry.npmjs.org
- name: Install Deps
run: yarn install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Validate TypeScript
run: yarn tsc
lint:
name: Lint code
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Install deps
run: yarn install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Validate Lint
run: yarn lint
jest:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Install deps
run: yarn install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Validate Unit Tests
run: yarn test
build_ios:
name: Build IPA file on EAS
if: ${{ contains(github.event.pull_request.labels.*.name, 'ready for review') }}
needs:
- typescript
- lint
- jest
runs-on: ubuntu-latest
outputs:
id: ${{ steps.iosBuild.outputs.id }}
url: ${{ steps.iosBuild.outputs.url }}
steps:
- name: Setup repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
registry-url: https://registry.npmjs.org/
- name: Setup Expo and EAS
uses: expo/expo-github-action@v7
with:
expo-version: 5.x
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: yarn install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build IPA
id: iosBuild
run: |
eas build --platform ios --non-interactive --profile development-internal --json > build_ios.json
echo "::set-output name=id::$(jq '.[] .id' build_ios.json -r)"
echo "::set-output name=url::$(jq '.[] .artifacts.buildUrl' build_ios.json -r)"
pr_comment:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ready for review') }}
needs:
- build_ios
runs-on: ubuntu-latest
steps:
- name: Comment PR
uses: unsplash/comment-on-pr@v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: |
Build successfully created. Here are the URLs:
- iOS Build URL - https://expo.dev/accounts/fluidtruck/projects/delta/builds/${{ needs.build_ios.outputs.id }}
check_for_duplicate_msg: false
delete_prev_regex_msg: "Build successfully created. Here are the URLs"
EAS.config有什么问题吗?
发布于 2022-11-09 08:33:23
当我们打开带有标签的PR时,它似乎会触发重复。
我把这个改成:
types: [labeled, synchronize]
现在情况似乎好多了。但奇怪的是,另一种回购有opened
的原始类型,而且不重复.
https://stackoverflow.com/questions/74322700
复制相似问题