Skip to content

Commit

Permalink
[devops][bugfix]: fix refname (#2)
Browse files Browse the repository at this point in the history
* bundling fix
  • Loading branch information
leblancmeneses authored May 29, 2024
1 parent 43a0922 commit a39dfc4
Show file tree
Hide file tree
Showing 9 changed files with 23,160 additions and 362 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,17 @@ jobs:
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "build" targets have been requested
# - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build"


- name: debug
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_INPUTS: ${{ toJson(inputs) }}
shell: bash
run: |
echo "Look at github outputs in prior command."
echo "$GITHUB_INPUTS"
echo "$GITHUB_CONTEXT"
printenv
# Cache node_modules
- uses: actions/setup-node@v4
with:
Expand All @@ -48,5 +58,7 @@ jobs:
run: git diff --exit-code -- ./dist

version-autopilot-tests:
if: |
!failure() && !cancelled() && github.event_name == 'pull_request'
needs: [main]
uses: ./.github/workflows/tests.version-autopilot.yml
2 changes: 1 addition & 1 deletion apps/version-autopilot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ outputs:
description: 'a number representing the version'
runs:
using: 'node20'
main: 'apps/version-autopilot/src/main.js'
main: 'main.js'
5 changes: 3 additions & 2 deletions apps/version-autopilot/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
"platform": "node",
"outputPath": "dist/apps/version-autopilot",
"format": ["cjs"],
"bundle": false,
"bundle": true,
"thirdParty": true,
"main": "apps/version-autopilot/src/main.ts",
"tsConfig": "apps/version-autopilot/tsconfig.app.json",
"assets": ["apps/version-autopilot/action.yml"],
"generatePackageJson": true,
"generatePackageJson": false,
"esbuildOptions": {
"sourcemap": true,
"outExtension": {
Expand Down
2 changes: 1 addition & 1 deletion apps/version-autopilot/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function run() {
const patch = process.env['PATCH_OVERRIDE']? parseInt(process.env['PATCH_OVERRIDE'] || '0', 10) : github.context.runNumber;
const version = getVersion(major, minor, patch, shift);
const shortSha = `${github.context.sha}`.substring(0, 12);
let versionStringRecommended = `${version.versionString}-${github.context.ref}-${shortSha}`;
let versionStringRecommended = `${version.versionString}-${process.env['GITHUB_HEAD_REF'] || ''}-${shortSha}`;
if (github.context.eventName === 'pull_request') {
versionStringRecommended = `${version.versionString}-pr-${github.context.payload.pull_request.number}-${shortSha}`;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/apps/version-autopilot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ outputs:
description: 'a number representing the version'
runs:
using: 'node20'
main: 'apps/version-autopilot/src/main.js'
main: 'main.js'
60 changes: 0 additions & 60 deletions dist/apps/version-autopilot/apps/version-autopilot/src/main.js

This file was deleted.

Loading

0 comments on commit a39dfc4

Please sign in to comment.