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

FYI: Container actions only work on linux builds #11

Open
rjstone opened this issue Nov 21, 2019 · 6 comments
Open

FYI: Container actions only work on linux builds #11

rjstone opened this issue Nov 21, 2019 · 6 comments

Comments

@rjstone
Copy link

rjstone commented Nov 21, 2019

Doesn't work for windows builds. Might want to mention in docs.

@Rkbhasan1
Copy link

what is work for my builds ?this is my personal subject .plese don't distrib me.-:)

@Rkbhasan1
Copy link

Rkbhasan1 commented Dec 18, 2019 via email

@Ilshidur
Copy link
Owner

Hello. Sorry for the late response. I finally have some free time to check this issue. Thanks for your patience.

@rosman21
Copy link

Confirming this is still an issue I am getting the error on the following builds.

Run Ilshidur/action-discord@cc38eb40798e4aafd43ae51e8dd3e507dc57234e
##[error]Container action is only supported on Linux

@Ilshidur
Copy link
Owner

Hello. Sorry, I totally forgot about this issue.

Apparently, containerized Actions can only runs on Linux environments according to this doc : https://help.github.com/en/actions/building-actions/about-actions#types-of-actions

I can't find any proper way to make it compatible, except to migrate it to a pure Javascript Action, which would make it a breaking change.

For now, if you use a GitHub-hosted runner, I recommend to use the ubuntu-18.04 environment :

jobs:
  build:
    runs-on: ubuntu-18.04
    steps:
      - name: Discord notification
      env:
        DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
      uses: Ilshidur/action-discord@master
      with:
        args: 'The project {{ EVENT_PAYLOAD.repository.full_name }} has been deployed.'

Sorry to answer this issue after so long ... only to provide so little help.

If someone has a workaround for this, I would be glad to document this or apply a fix. I admit that this can be a pain. Let's hope that GitHub has planned some solutions in the near future 🤞 .

@ldd
Copy link

ldd commented Nov 20, 2020

I'm commenting here because someone surely, someday, will come back again and wonder how to do it on windows.

      - name: notify
        env:
          DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
        run: |
          $MESSAGE=@"
          {\"content\": \"Cool message"}
          "@
          C:\msys64\usr\bin\curl.exe -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST $env:DISCORD_WEBHOOK --data $MESSAGE

There you go, no dependencies needed, not even this action. just a simple curl request.
Have fun!

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

No branches or pull requests

6 participants
@rjstone @ldd @rosman21 @Ilshidur @Rkbhasan1 and others