-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
77 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,36 @@ | ||
name: 'Setup SAP RFC environment' | ||
description: 'Setup a SAP RFC environment by installing the SDK.' | ||
name: Setup SAP RFC | ||
description: Setup a SAP RFC environment by installing the SDK | ||
|
||
inputs: | ||
github-token: | ||
required: true | ||
description: 'The Github PAT (personal access token)' | ||
os: | ||
required: false | ||
description: 'System Operation (only supports for linux)' | ||
description: 'Operating System (only supports linux)' | ||
default: 'linux' | ||
sdk-version: | ||
required: false | ||
description: 'RFC SDK version (only supports for 750)' | ||
sdk-version: | ||
description: 'RFC SDK version (only supports 750)' | ||
default: '750' | ||
patch-level: | ||
required: false | ||
description: 'RFC SDK patch level (only supports for 10)' | ||
token: | ||
description: 'GitHub PAT' | ||
required: true | ||
patch-level: | ||
description: 'RFC SDK patch level (only supports 11)' | ||
default: '11' | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
using: composite | ||
steps: | ||
- name: Checkout Setup SAP RFC SDK | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: grupoboticario/actions-setup-sap-rfc | ||
path: setup-sap-rfc-sdk | ||
token: ${{ inputs.github-token }} | ||
|
||
- name: Setup SAP RFC SDK | ||
shell: bash | ||
if: ${{ inputs.os == 'linux' }} | ||
run: | | ||
echo "Listing contents..." | ||
ls -l | ||
echo "Listing SAP RFC SDK contents..." | ||
ls -l $SETUP_SAP_RFC_SDK_DIR | ||
echo "Copying nwrfcsdk.conf..." | ||
sudo cp $SETUP_SAP_RFC_SDK_DIR/assets/nwrfcsdk.conf /etc/ld.so.conf.d/ | ||
ls -l /etc/ld.so.conf.d/ | ||
echo "Unziping nwrfc${{ inputs.sdk-version }}P_${{ inputs.patch-level }}_${{ inputs.os }}.zip..." | ||
sudo unzip -o $SETUP_SAP_RFC_SDK_DIR/assets/nwrfc${{ inputs.sdk-version }}P_${{ inputs.patch-level }}_${{ inputs.os }}.zip -d /usr/local/sap | ||
ls -l /usr/local/sap | ||
echo "Exporting SAPNWRFC_HOME..." | ||
export SAPNWRFC_HOME=/usr/local/sap/nwrfcsdk | ||
echo $SAPNWRFC_HOME | ||
echo "Running ldconfig..." | ||
sudo ldconfig | ||
echo "Removing SAP RFC SDK contents..." | ||
rm -rf $SETUP_SAP_RFC_SDK_DIR | ||
echo "SAP RFC SDK ${{ inputs.sdk-version }}P_${{ inputs.patch-level }}_${{ inputs.os }} has been successfully configured!!!" | ||
env: | ||
SETUP_SAP_RFC_SDK_DIR: setup-sap-rfc-sdk | ||
token: ${{ inputs.token }} | ||
- name: Run Action | ||
uses: ./setup-sap-rfc-sdk | ||
with: | ||
os: ${{ inputs.os }} | ||
patch-level: ${{ inputs.patch-level }} | ||
sdk-version: ${{ inputs.sdk-version }} | ||
token: ${{ inputs.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
cache: npm | ||
node-version-file: .nvmrc | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Setup SAP RFC SDK | ||
uses: ./.github/actions/actions-setup-sap-rfc | ||
with: | ||
github-token: ${{ secrets.GH_TOKEN }} | ||
patch-level: '11' | ||
|
||
- run: npm ci | ||
- run: npm run build | ||
- run: npm publish | ||
token: ${{ secrets.GH_TOKEN }} | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
- name: Publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_AUTH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters