sfcc-ci icon indicating copy to clipboard operation
sfcc-ci copied to clipboard

GitHub Actions

Open gokaygurcan opened this issue 4 years ago • 5 comments

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.

gokaygurcan avatar Jun 11 '20 13:06 gokaygurcan

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?

tobiaslohr avatar Jun 12 '20 08:06 tobiaslohr

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.

Trimud avatar Nov 25 '20 20:11 Trimud

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.

gokaygurcan avatar Nov 26 '20 00:11 gokaygurcan

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

rbknajera avatar May 11 '21 23:05 rbknajera

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.

gokaygurcan avatar May 20 '21 08:05 gokaygurcan