Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions #159

Open
gokaygurcan opened this issue Jun 11, 2020 · 5 comments
Open

GitHub Actions #159

gokaygurcan opened this issue Jun 11, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@gokaygurcan
Copy link
Member

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/action-zip@v0.1.0
        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.

@tobiaslohr
Copy link
Contributor

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 tobiaslohr added the enhancement New feature or request label Jun 12, 2020
@Trimud
Copy link

Trimud commented Nov 25, 2020

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.

@gokaygurcan
Copy link
Member Author

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.

@rbknajera
Copy link

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

@gokaygurcan
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants