Skip to content

Commit 3f93b18

Browse files
committed
fix: correctly copy action contents to the workspace instead of the directory itself.
1 parent 386b911 commit 3f93b18

File tree

6 files changed

+24
-14
lines changed

6 files changed

+24
-14
lines changed

.github/actions/version-bumping/maven/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ runs:
5858

5959
- name: Bump up project version
6060
id: bump
61-
uses: ./.github/actions/core
61+
uses: sap/pull-request-semver-bumper/.github/actions/core@main
6262
with:
6363
build-type: "maven"
6464
pom-file: ${{ inputs.pom-file }}

.github/actions/version-bumping/npm/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ runs:
6161

6262
- name: Bump up npm pr version
6363
id: bump
64-
uses: ./.github/actions/core
64+
uses: sap/pull-request-semver-bumper/.github/actions/core@main
6565
with:
6666
build-type: "npm"
6767
package-json-file: ${{ inputs.package-json-file }}

.github/actions/version-bumping/python/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ runs:
6060
6161
- name: Bump up project version
6262
id: bump
63-
uses: ./.github/actions/core
63+
uses: sap/pull-request-semver-bumper/.github/actions/core@main
6464
with:
6565
build-type: "python"
6666
pyproject-file: ${{ inputs.pyproject-file }}

.github/actions/version-bumping/version-file/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ runs:
5151

5252
- name: Bump up version file
5353
id: bump
54-
uses: ./.github/actions/core
54+
uses: sap/pull-request-semver-bumper/.github/actions/core@main
5555
with:
5656
build-type: "version-file"
5757
version-file: ${{ inputs.version-file }}

.github/workflows/build-and-test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ jobs:
7373
pull-requests: read
7474
steps:
7575
- uses: actions/checkout@v4
76+
- name: Patch composite actions for E2E
77+
run: |
78+
sed -i -E 's|sap/pull-request-semver-bumper/.github/actions/core@[^[:space:]"]+|./.github/actions/core|g' .github/actions/version-bumping/*/action.yml
79+
sed -i -E 's|sap/pull-request-semver-bumper/.github/actions/version-bumping/python@[^[:space:]"]+|./.github/actions/version-bumping/python|g' action.yml
7680
- name: Test Python Action (Dry Run)
7781
id: version_bump
7882
uses: ./
@@ -100,6 +104,10 @@ jobs:
100104
pull-requests: read
101105
steps:
102106
- uses: actions/checkout@v4
107+
- name: Patch composite actions for E2E
108+
run: |
109+
sed -i -E 's|sap/pull-request-semver-bumper/.github/actions/core@[^[:space:]"]+|./.github/actions/core|g' .github/actions/version-bumping/*/action.yml
110+
sed -i -E 's|sap/pull-request-semver-bumper/.github/actions/version-bumping/npm@[^[:space:]"]+|./.github/actions/version-bumping/npm|g' action.yml
103111
- name: Test NPM Action (Dry Run)
104112
id: version_bump
105113
uses: ./
@@ -127,6 +135,10 @@ jobs:
127135
pull-requests: read
128136
steps:
129137
- uses: actions/checkout@v4
138+
- name: Patch composite actions for E2E
139+
run: |
140+
sed -i -E 's|sap/pull-request-semver-bumper/.github/actions/core@[^[:space:]"]+|./.github/actions/core|g' .github/actions/version-bumping/*/action.yml
141+
sed -i -E 's|sap/pull-request-semver-bumper/.github/actions/version-bumping/maven@[^[:space:]"]+|./.github/actions/version-bumping/maven|g' action.yml
130142
- name: Test Maven Action (Dry Run)
131143
id: version_bump
132144
uses: ./
@@ -156,6 +168,10 @@ jobs:
156168
pull-requests: read
157169
steps:
158170
- uses: actions/checkout@v4
171+
- name: Patch composite actions for E2E
172+
run: |
173+
sed -i -E 's|sap/pull-request-semver-bumper/.github/actions/core@[^[:space:]"]+|./.github/actions/core|g' .github/actions/version-bumping/*/action.yml
174+
sed -i -E 's|sap/pull-request-semver-bumper/.github/actions/version-bumping/version-file@[^[:space:]"]+|./.github/actions/version-bumping/version-file|g' action.yml
159175
- name: Test Version File Action (Dry Run)
160176
id: version_bump
161177
uses: ./

action.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,10 @@ outputs:
6868
runs:
6969
using: "composite"
7070
steps:
71-
- name: Copy Actions to Workspace
72-
shell: bash
73-
# FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684
74-
# original ref: https://github.com/hoverkraft-tech/ci-github-common/issues/161
75-
run: |
76-
[ -d .github/actions ] || (mkdir -p .github/actions && cp -r $GITHUB_ACTION_PATH/.github/actions/* .github/actions/)
7771
- name: Bump Maven
7872
if: inputs.type == 'maven'
7973
id: bump_maven
80-
uses: ./.github/actions/version-bumping/maven
74+
uses: sap/pull-request-semver-bumper/.github/actions/version-bumping/maven@main
8175
with:
8276
token: ${{ inputs.token }}
8377
dry-run: ${{ inputs.dry-run }}
@@ -92,7 +86,7 @@ runs:
9286
- name: Bump NPM
9387
if: inputs.type == 'npm'
9488
id: bump_npm
95-
uses: ./.github/actions/version-bumping/npm
89+
uses: sap/pull-request-semver-bumper/.github/actions/version-bumping/npm@main
9690
with:
9791
token: ${{ inputs.token }}
9892
dry-run: ${{ inputs.dry-run }}
@@ -106,7 +100,7 @@ runs:
106100
- name: Bump Python
107101
if: inputs.type == 'python'
108102
id: bump_python
109-
uses: ./.github/actions/version-bumping/python
103+
uses: sap/pull-request-semver-bumper/.github/actions/version-bumping/python@main
110104
with:
111105
token: ${{ inputs.token }}
112106
dry-run: ${{ inputs.dry-run }}
@@ -120,7 +114,7 @@ runs:
120114
- name: Bump Version File
121115
if: inputs.type == 'version-file'
122116
id: bump_version_file
123-
uses: ./.github/actions/version-bumping/version-file
117+
uses: sap/pull-request-semver-bumper/.github/actions/version-bumping/version-file@main
124118
with:
125119
token: ${{ inputs.token }}
126120
dry-run: ${{ inputs.dry-run }}

0 commit comments

Comments
 (0)