Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/actions/integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,17 @@ runs:

- name: Authenticate with Cloud Foundry
shell: bash
env:
CF_API: ${{ inputs.CF_API }}
CF_USERNAME: ${{ inputs.CF_USERNAME }}
CF_PASSWORD: ${{ inputs.CF_PASSWORD }}
CF_ORG: ${{ inputs.CF_ORG }}
CF_SPACE: ${{ inputs.CF_SPACE }}
run: |
echo "::debug::CF_API=${{ inputs.CF_API }}"
for i in {1..5}; do
cf login -a ${{ inputs.CF_API }} -u ${{ inputs.CF_USERNAME }} -p ${{ inputs.CF_PASSWORD }} -o ${{ inputs.CF_ORG }} -s ${{ inputs.CF_SPACE }} && break
cf api "$CF_API" && \
cf auth && \
Comment thread
SirSimon04 marked this conversation as resolved.
cf target -o "$CF_ORG" -s "$CF_SPACE" && break
echo "cf login failed, retrying ($i/5)..."
sleep 10
if [ "$i" -eq 5 ]; then
Expand All @@ -53,11 +60,11 @@ runs:
fi
done

- uses: actions/checkout@v5
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This checkout is maybe redundant since the test.yml workflow already checkouts before calling the action. See cap-js/ai

with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Use Node.js ${{ inputs.NODE_VERSION}}
uses: actions/setup-node@v6
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ inputs.NODE_VERSION }}
- run: npm i -g @sap/cds-dk
Expand Down
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
github-actions:
patterns:
- "*"
cooldown:
default-days: 7
6 changes: 5 additions & 1 deletion .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
name: Check Changelog Action
runs-on: ubuntu-latest
steps:
- uses: tarides/changelog-check-action@v3
- name: Harden Runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- uses: tarides/changelog-check-action@0189fc7eedec3ef3e9648c713908f6f2a6e99057 # v3
with:
changelog: CHANGELOG.md
6 changes: 5 additions & 1 deletion .github/workflows/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ jobs:
label-issues:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- run: gh issue edit "$NUMBER" --add-label "$LABELS"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: New

- uses: actions/github-script@v8
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
script: |
github.rest.issues.createComment({
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,22 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v6
- uses: actions/checkout@v6
- name: Harden Runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
- run: npm i
- run: npm run lint

prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v6
- uses: actions/checkout@v6
- name: Harden Runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
- run: npx prettier . --check
4 changes: 4 additions & 0 deletions .github/workflows/prevent-issue-labeling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
remove_new_label:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- name: Remove "New" label if applied by non-bot user
if: >
contains(github.event.issue.labels.*.name, 'New') &&
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ jobs:
runs-on: ubuntu-latest
environment: npm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Harden Runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24
registry-url: https://registry.npmjs.org/
Expand All @@ -41,11 +45,11 @@ jobs:
uses: martinbeentjes/npm-get-version-action@v1.2.3
- name: Parse changelog
id: parse-changelog
uses: schwma/parse-changelog-action@v1.0.0
uses: schwma/parse-changelog-action@69a9f9ab4cf2f2e736108ab41396fc3c55f65e40 # v1.0.0
with:
version: "${{ steps.package-version.outputs.current-version }}"
- name: Create a GitHub release
uses: ncipollo/release-action@v1
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
with:
tag: "v${{ steps.package-version.outputs.current-version }}"
body: "${{ steps.parse-changelog.outputs.body }}"
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ jobs:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v5
- name: Harden Runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
Comment thread
KoblerS marked this conversation as resolved.
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ matrix.node-version }}
- run: npm i -g @sap/cds-dk
Expand All @@ -53,12 +57,16 @@ jobs:
hyperscaler: [AWS, AZURE, GCP]
scanner-auth: [basic, mtls]
steps:
- name: Harden Runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Integration tests (HANA)
uses: ./.github/actions/integration-tests
uses: ./.github/actions/integration-tests@main
with:
CF_API: ${{ secrets[format('CF_API_{0}', matrix.hyperscaler)] }}
CF_USERNAME: ${{ secrets['CF_USERNAME'] }}
Expand Down Expand Up @@ -92,11 +100,15 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v5
- name: Harden Runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ matrix['node-version'] }}
- run: npm i -g @sap/cds-dk
Expand Down
Loading