Skip to content

Commit

Permalink
fix(github-actions): undeterministic github actions packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
fpaul-1A committed Jan 28, 2025
1 parent 5bf474a commit ab8dbc0
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,5 @@ jobs:
env:
NX_BASE: ${{ format('remotes/origin/{0}', github.base_ref || github.ref_name) }}
nxCmd: ${{ inputs.affected && 'nx affected' || 'nx run-many'}}
run: yarn ${{ env.nxCmd }} --target=package-github-action
run: yarn ${{ env.nxCmd }} --target=package-github-action --configuration=force-rebuild

18 changes: 16 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,16 @@
"{projectRoot}/dist/package.json",
"{projectRoot}/dist/readme.json",
"{projectRoot}/dist/LICENSE"
]
],
"configurations": {
"default": {},
"force-rebuild": {
"dependsOn": [
"build"
]
}
},
"defaultConfiguration": "default"
},
"publish-extension": {
"cache": false
Expand Down Expand Up @@ -574,6 +583,10 @@
"cache": true
},
"package-github-action": {
"executor": "nx:run-script",
"options": {
"script": "package"
},
"cache": true,
"inputs": [
"default",
Expand All @@ -584,7 +597,8 @@
"{projectRoot}/packaged-action"
],
"dependsOn": [
"build"
"build",
"^prepare-publish"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"publish": "yarn nx run-many --target=publish --exclude=tag:private --nx-bail",
"publish:extensions": "yarn nx run-many --target=publish-extension",
"publish:extensions:affected": "yarn nx affected --target=publish-extension",
"package-github-actions:affected": "yarn nx affected --target=package-github-action",
"package-github-actions:affected": "yarn nx affected --target=package-github-action --configuration=force-rebuild",
"lint": "yarn nx run-many --target=lint",
"lint:affected": "yarn nx affected --target=lint",
"test": "yarn nx run-many --target=test",
Expand Down
7 changes: 1 addition & 6 deletions tools/github-actions/audit/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@
"script": "build"
}
},
"package-github-action": {
"executor": "nx:run-script",
"options": {
"script": "package"
}
},
"package-github-action": {},
"lint": {},
"test": {}
},
Expand Down
7 changes: 1 addition & 6 deletions tools/github-actions/cascading/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@
"script": "build"
}
},
"package-github-action": {
"executor": "nx:run-script",
"options": {
"script": "package"
}
},
"package-github-action": {},
"lint": {},
"test": {}
},
Expand Down
7 changes: 1 addition & 6 deletions tools/github-actions/get-npm-tag/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@
"script": "build"
}
},
"package-github-action": {
"executor": "nx:run-script",
"options": {
"script": "package"
}
},
"package-github-action": {},
"lint": {}
},
"tags": []
Expand Down
7 changes: 1 addition & 6 deletions tools/github-actions/new-version/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@
"script": "build"
}
},
"package-github-action": {
"executor": "nx:run-script",
"options": {
"script": "package"
}
},
"package-github-action": {},
"lint": {},
"test": {}
},
Expand Down
7 changes: 1 addition & 6 deletions tools/github-actions/release/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@
"script": "build"
}
},
"package-github-action": {
"executor": "nx:run-script",
"options": {
"script": "package"
}
},
"package-github-action": {},
"lint": {}
},
"tags": []
Expand Down

0 comments on commit ab8dbc0

Please sign in to comment.