Skip to content

Commit 4e800b8

Browse files
authored
Align CF and Maven workflows (#53)
Ensure credentials for Maven/NPM are always properly provided.
1 parent 8896f22 commit 4e800b8

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

.github/workflows/cf.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ concurrency:
2323
env:
2424
APP_NAME: xtravels
2525
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2627
FORCE_COLOR: true
28+
2729
jobs:
2830
deploy:
2931
runs-on: ubuntu-latest
@@ -46,12 +48,9 @@ jobs:
4648
username: ${{ vars.CF_USERNAME }}
4749
password: ${{ secrets.CF_PASSWORD }}
4850
- run: npm install
49-
env:
50-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
5151

5252
- name: Set xflights URL
5353
env:
54-
GH_TOKEN: ${{ github.token }}
5554
ENVIRONMENT: ${{ inputs.environment || 'Staging' }}
5655
run: |
5756
xflights=$(

.github/workflows/maven.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ on:
1010
pull_request:
1111
branches: [ "main" ]
1212

13+
permissions:
14+
contents: read
15+
packages: read
16+
17+
env:
18+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
19+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
20+
1321
jobs:
1422
build:
15-
1623
runs-on: ubuntu-latest
17-
permissions:
18-
contents: read
19-
packages: read
20-
2124
steps:
2225
- uses: actions/checkout@v6
2326
- name: Set up JDK
@@ -34,6 +37,3 @@ jobs:
3437

3538
- name: Build with Maven
3639
run: mvn -ntp -B package
37-
env:
38-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
39-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)