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

Node version of runner on self-hosted Docker install #41

Open
levibostian opened this issue Aug 22, 2022 · 1 comment
Open

Node version of runner on self-hosted Docker install #41

levibostian opened this issue Aug 22, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@levibostian
Copy link

Description

I am setting up a workflow to run via self-hosted Docker install. I have created a workflow and am able to execute it successfully but am getting an error saying a GitHub Action step needs to use node12 but the action is setup to use node16.

Is the github actions runner code out-of-date? I know github actions supports node16? What package needs to be updated in order to support node16 actions in self-hosted install?

Steps to reproduce

Note: See workflow source code files pasted below. First, I'll describe the steps.

  • Save actionsflow workflow file and javascript script trigger file.
  • Run the actionsflow workflow via Docker. I am using macOS. I have the latest actionsflow docker image as I deleted all of my images on my machine before running.
  • When executing actionsflow workflow, it should execute the workflow right away because of the javascript script trigger returning 1 object.

When you execute the script, you will find the error I am describing:

time="2022-08-22T19:54:54Z" level=info msg="  ☁  git clone 'https://github.com/actions/github-script' # ref=v6"
actionsflow_1  | [0-email-to-ynab-script.yml/Email to YNAB 0]   ❌  Failure - Get data from trigger
actionsflow_1  | Error: The runs.using key in action.yml must be one of: [composite docker node12], got node16

The error message makes me think that we are using an old version of act as the github actions runner in act is probably too old and does not support node16? But I am executing actionsflow/setup-act-for-actionsflow@v1 in my workflow to install the latest version 0.2.25 and still get the error.

Here is my full actionsflow workflow:

# on:
#   email:
#     imap:
#       host: imap.fastmail.com
#       port: 993
#       user: ${{secrets.EMAIL_USER}}
#       password: ${{secrets.EMAIL_PASSWORD}}
on: 
  script:
    path: ./workflows/test-data/email-to-ynab.js        

jobs:
  email-to-ynab:
    name: Email to YNAB
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3 # checkout to get the local actions I created 
      - uses: actionsflow/setup-act-for-actionsflow@v1 # to install latest act version
      
      # This is the action where the error occurs. However, if I try to use *any* action 
      # that is setup to run using node16, the same error will occur. This action is easy to test with. 
      - name: Get data from trigger 
        uses: actions/github-script@v6
        id: data
        env:
          TRIGGER_EMAIL_DATA: ${{ on.email }}
          TRIGGER_TEST_DATA: ${{ on.script }}
        with:
          # Script has not been tested yet. It might not work. Error occurs before script can even execute. 
          script: |
            const triggerData = process.env.TRIGGER_EMAIL_DATA || process.env.TRIGGER_TEST_DATA
            core.setOutput('data', triggerData.outputs)

The script trigger file ./workflows/test-data/email-to-ynab.js is:

// Note: I left some 
const emailNoTransaction = {
  "attachments": [
    {
      "mimeType": "text/plain",
      "data": "dGVzdA==",
      "fileName": "test.txt",
      "fileExtension": "txt"
    }
  ],
  "text": "Test body.",
  "textAsHtml": "<p>Test body.</p>",
  "subject": "Test Subject",
  "date": "2020-09-14T23:44:20.000Z",
  "to": {
    "value": [
      {
        "address": "theowenyoung@outlook.com",
        "name": ""
      }
    ],
    "html": "<span class=\"mp_address_group\"><a href=\"mailto:theowenyoung@outlook.com\" class=\"mp_address_email\">theowenyoung@outlook.com</a></span>",
    "text": "theowenyoung@outlook.com"
  },
  "from": {
    "value": [
      {
        "address": "theowenyoung@gmail.com",
        "name": "Owen Young"
      }
    ],
    "html": "<span class=\"mp_address_group\"><span class=\"mp_address_name\">Owen Young</span> &lt;<a href=\"mailto:theowenyoung@gmail.com\" class=\"mp_address_email\">theowenyoung@gmail.com</a>&gt;</span>",
    "text": "Owen Young <theowenyoung@gmail.com>"
  },
  "cc": {
    "value": [
      {
        "address": "owen@owenyoung.com",
        "name": ""
      },
      {
        "address": "test@owenyoung.com",
        "name": ""
      }
    ],
    "html": "<span class=\"mp_address_group\"><a href=\"mailto:owen@owenyoung.com\" class=\"mp_address_email\">owen@owenyoung.com</a></span>, <span class=\"mp_address_group\"><a href=\"mailto:test@owenyoung.com\" class=\"mp_address_email\">test@owenyoung.com</a></span>",
    "text": "owen@owenyoung.com, test@owenyoung.com"
  },
  "messageId": "<098F27FF-0F94-406E-A8B1-933D5B21CB43@gmail.com>",
  "html": false
}

module.exports = async function ({ helpers }) {
    return [
        emailNoTransaction
    ]
};

Expected result

My workflow can execute github actions that run using node16.

Actual result

My workflow only supports running github actions that run on node12 at the highest.

@levibostian levibostian added the bug Something isn't working label Aug 22, 2022
@theowenyoung
Copy link
Member

Hi, I'm sorry, I'm not using actionsflow anymore, I'm scared of actionsflow upgrades, I think you can downgrade scripts action to v3 for now, that should be a usable version, thanks!

# on:
#   email:
#     imap:
#       host: imap.fastmail.com
#       port: 993
#       user: ${{secrets.EMAIL_USER}}
#       password: ${{secrets.EMAIL_PASSWORD}}
on: 
  script:
    path: ./workflows/test-data/email-to-ynab.js        

jobs:
  email-to-ynab:
    name: Email to YNAB
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3 # checkout to get the local actions I created 
      #- uses: actionsflow/setup-act-for-actionsflow@v1 # to install latest act version
      
      # This is the action where the error occurs. However, if I try to use *any* action 
      # that is setup to run using node16, the same error will occur. This action is easy to test with. 
      - name: Get data from trigger 
        uses: actions/github-script@v3
        id: data
        env:
          TRIGGER_EMAIL_DATA: ${{ on.email }}
          TRIGGER_TEST_DATA: ${{ on.script }}
        with:
          # Script has not been tested yet. It might not work. Error occurs before script can even execute. 
          script: |
            const triggerData = process.env.TRIGGER_EMAIL_DATA || process.env.TRIGGER_TEST_DATA
            core.setOutput('data', triggerData.outputs)

Rabenherz112 added a commit to Rabenherz112/awesome-selfhosted that referenced this issue Aug 20, 2023
- The most recent commit occurred [more than a year ago](actionsflow/actionsflow@06edc40).
- The main maintainer has mentioned in a [comment](actionsflow/actionsflow#41 (comment)) that they no longer utilize the software.
- The software has dependencies that are now outdated.
nodiscc pushed a commit to awesome-selfhosted/awesome-selfhosted that referenced this issue Aug 22, 2023
- The most recent commit occurred [more than a year ago](actionsflow/actionsflow@06edc40).
- The main maintainer has mentioned in a [comment](actionsflow/actionsflow#41 (comment)) that they no longer utilize the software.
- The software has dependencies that are now outdated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants