Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composite Run Steps GitHub Actions error: 'An action could not be found at the URI'

I am trying to use a composite run steps action on GitHub Actions, as described here, in order to reuse them in different workflows. However, I am getting the error:

An action could not be found at the URI 'https://api.github.com/repos/scripts/build_ubuntu/tarball/v1

My main workflow (.github/workflows/BuildUbuntu.yml) is the following:

[...]

jobs:
  ubuntu_build_appimage:
    name: Build MeshLab (Ubuntu - AppImage)
    runs-on: ubuntu-16.04

    steps:
    - uses: scripts/build_ubuntu@v1

[...]

And the composite step (.github/workflows/scripts/build_ubuntu/action.yml) is the following:

runs:
  using: "composite"
  steps: 
  - uses: actions/checkout@v2
    with:
      submodules: true

  [other steps...]

What am I doing wrong?

Here are the links: GitHub Commit Workflow

like image 326
Alessandro Muntoni Avatar asked Aug 26 '20 11:08

Alessandro Muntoni


1 Answers

Your workflow is referencing the action incorrectly. It's looking for the repository build_ubuntu of the user / organization scripts with the tag v1.

You can reference it locally, because it is in the same repository.

[...]

jobs:
  ubuntu_build_appimage:
    name: Build MeshLab (Ubuntu - AppImage)
    runs-on: ubuntu-16.04

    steps:
    - uses: actions/checkout@v2
    - uses: ./.github/workflows/scripts/build_ubuntu

[...]

Your action is missing the name and description elements. These are required as per https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions.

In addition, you can't use the uses step in a composite run steps action as webknjaz noted in his comment. Currently you can only use run steps with the following subelements

What does composite run steps currently support?

For each run step in a composite action, we support:

  • name
  • id
  • run
  • env
  • shell
  • working-directory

In addition, we support mapping input and outputs throughout the action.
[...]

What does Composite Run Steps Not Support

We don't support setting conditionals, continue-on-error, timeout-minutes, "uses", and secrets on individual steps within a composite action right now.

(Note: we do support these attributes being set in workflows for a step that uses a composite run steps action)

(source: https://github.com/actions/runner/issues/646)

name: "My composite action"
description: "Execute some run setps to do something"
runs:
  using: "composite"
  steps: 
  - run: |
      echo do something
      echo and do something else

  [other steps...]
like image 77
riQQ Avatar answered Nov 19 '22 11:11

riQQ