Git Product home page Git Product logo

action-scw's Introduction

GitHub action for Scaleway CLI

This action install scaleway-cli and allows you to run commands as well as install and export your config.

Usage

Config

  • save_config: save your config to scaleway's config file, useful to use it with other tools like terraform or SDKs
  • export_config: export your config to the environment to use the same action in the next steps

Checkout CLI's config documentation

- name: Use CLI
  uses: scaleway/action-scw@v0
  with:
    save-config: true
    export-config: true
    version: v2.24.0
    access-key: ${{ secrets.SCW_ACCESS_KEY }}
    secret-key: ${{ secrets.SCW_SECRET_KEY }}
    default-project-id: ${{ secrets.SCW_DEFAULT_PROJECT_ID }}
    default-organization-id: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }}

Commands

  • args: when arguments are given, a command will be executed and the json output will be in the json output
- name: Use CLI
  uses: scaleway/action-scw@v0
  id: cli
  with:
    args: instance server get ${{ env.SERVER_ID }}
- run: echo ${{ steps.cli.outputs.json }}

Others

  • version: default to latest, must be exact version. Fetched from exported config if available
  • access-key
  • secret-key
  • default-project-id
  • default-organization-id

action-scw's People

Contributors

clementgoclock avatar codelax avatar dependabot[bot] avatar remyleone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

action-scw's Issues

Warning: Node.js 16 actions are deprecated

Hi!

Github Actions warns about Node.js 16 when using scaleway/action-scw@v0.

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: scaleway/action-scw@v0. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

New scaleway-cli release broke the action run

Since new release v2.30.0 minutes ago.

1s
Run scaleway/action-scw@v0
  with:
    save-config: true
    export-config: true
    access-key: ***
    secret-key: ***
    default-project-id: ***
    default-organization-id: ***
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.9.[1](https://github.com/O-clock-Dev/terraform-infra/actions/runs/8691001241/job/23832188076#step:5:1)9/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.19/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.19/x64
    Python[2](https://github.com/O-clock-Dev/terraform-infra/actions/runs/8691001241/job/23832188076#step:5:2)_ROOT_DIR: /opt/hostedtoolcache/Python/[3](https://github.com/O-clock-Dev/terraform-infra/actions/runs/8691001241/job/23832188076#step:5:3).9.19/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.19/x6[4](https://github.com/O-clock-Dev/terraform-infra/actions/runs/8691001241/job/23832188076#step:5:4)
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.19/x64/lib
Didn't found CLI in cache, downloading v2.30.0
file:///home/runner/work/_actions/scaleway/action-scw/v0/dist/index.js:3389
            const err = new HTTPError(response.message.statusCode);
                        ^

HTTPError: Unexpected HTTP response: 404
    at file:///home/runner/work/_actions/scaleway/action-scw/v0/dist/index.js:3389:2[5](https://github.com/O-clock-Dev/terraform-infra/actions/runs/8691001241/job/23832188076#step:5:5)
    at Generator.next (<anonymous>)
    at fulfilled (file:///home/runner/work/_actions/scaleway/action-scw/v0/dist/index.js:3299:5[8](https://github.com/O-clock-Dev/terraform-infra/actions/runs/8691001241/job/23832188076#step:5:8))
    at process.processTicksAndRejections (node:internal/process/task_queues:[9](https://github.com/O-clock-Dev/terraform-infra/actions/runs/8691001241/job/23832188076#step:5:9)5:5) ***
  httpStatusCode: 404
***

Node.js v20.8.1

Workaround: specify previous version at least, example GHA workflow:

    - name: Configure Scaleway CLI
      uses: scaleway/action-scw@v0
      with:
        save-config: true
        export-config: true
        version: v2.29.0
        access-key: ${{ secrets.SCW_BBB_ACCESS_KEY }}
        secret-key: ${{ secrets.SCW_BBB_SECRET_KEY }}
        default-project-id: ${{ secrets.SCW_DEFAULT_PROJECT_ID }}
        default-organization-id: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.