sfcc-ci
sfcc-ci copied to clipboard
GitHub Actions
Hi,
It'd be really nice if we have this package as a GitHub Action. So that we could do something like:
name: Deploy Code
on: [ push ]
env:
SFCC_OAUTH_CLIENT_ID: ${{ secrets.SFCC_OAUTH_CLIENT_ID }}
SFCC_OAUTH_CLIENT_SECRET: ${{ secrets.SFCC_OAUTH_CLIENT_SECRET }}
SFCC_OAUTH_USER_NAME: ${{ secrets.SFCC_OAUTH_USER_NAME }}
SFCC_OAUTH_USER_PASSWORD: ${{ secrets.SFCC_OAUTH_USER_PASSWORD }}
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: zip
uses: montudor/[email protected]
with:
args: zip -qq -r ./output/code.zip ./cartridges
- name: code:deploy
uses: SalesforceCommerceCloud/sfcc-ci@latest
id: deploy
run: code:deploy ./output/code.zip -i ${{ secrets.INSTANCE_URL }}
I don't know, this might not be a good example and might not even work, but should be enough to understand the idea.
Hi @gokaygurcan, thanks for the proposal, I like the idea. Can you share some more thoughts about details you'd like to see for the Github Action itself?
Hi @gokaygurcan, you may want to consider https://www.npmjs.com/package/execa
Or what I did was to clone the repo using "actions/checkout@v2", running npm install
and after this npm link
.
After this you can use sfcc-ci
as you are in a terminal.
I think with this holiday season and low amount of releases, I can take a look at this and try to make it work. Stay tuned.
Do we have any news about this? I'm about to create a workflow on GitHub actions for my projects ci/cd and having this would be great
Tbh, I'm busy with other things and can't really tell when I can finish anything close to be useful. So, please don't wait up for me if you're waiting for any working solution. execa is a good alternative as suggested above, in github-script action you can call sfcc-ci with the parameters you want and parse the response as you like.