Giter VIP home page Giter VIP logo

actions-clever-cloud's Introduction

Deploy to Clever Cloud

Marketplace MIT License CI/CD GitHub Sponsors

GitHub action to deploy your application to Clever Cloud.

Prerequisite

⚠️ When creating an application on Clever Cloud, you have to choose between deploying "from a local repository" (using Clever CLI, Git or SFTP) or "from a Github repository" (using a webhook setup automatically by Clever Cloud). Only the first type of applications can be deployed using this Github action.

In your project's .clever.json, if the deploy_url value starts with https://github.com/, your application is meant to be deployed "from a Github repository" only. If you try deploying it with this Github action, you will get the following message in your logs: [ERROR] HTTP Error: 401 Authorization Required.

Currently (early 2023), the only workaround is to create a new application on Clever Cloud, that deploys "from a local repository", then remove the Clever Cloud webhook that has been created on your Github repository.

Usage

In your workflow file:

steps:
  # This action requires an unshallow working copy,
  # so the following prerequisites are necessary:
  - uses: actions/checkout@v3
    with:
      fetch-depth: 0

  # Deploy your application
  - uses: 47ng/[email protected]
    env:
      CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
      CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

This minimal example assumes you have only one application for this repository that was linked with clever link, and the .clever.json file is versioned at the root of the repository. If that's not the case, read on:

Specifying the application to deploy

Clever Cloud uses a .clever.json file at the root of your repository to link to application IDs.

If you have committed the .clever.json file, you only need to specify the alias of the application to deploy:

- uses: 47ng/[email protected]
  with:
    alias: my-app-alias
  env:
    CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
    CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

If you don't have this .clever.json file or you want to explicly deploy to another application, you can pass its ID:

- uses: 47ng/[email protected]
  with:
    appID: app_facade42-cafe-babe-cafe-deadf00dbaad
  env:
    CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
    CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

Application IDs can be found in the Clever Cloud console, at the top-right corner of any page for a given app, or in the Information tab. They look like app_{uuidv4}.

Authentication

You will need to pass a token and a secret for authentication, via the CLEVER_TOKEN and CLEVER_SECRET environment variables.

At the time of writing, the only way to obtain those credentials is to re-use the ones generated for a local CLI. For that:

  1. Install the clever-tools CLI locally
  2. Login on the CLI with clever login and follow the Web login process
  3. Extract the credentials:
$ cat ~/.config/clever-cloud/clever-tools.json
{"token":"[token]","secret":"[secret]"}
  1. In your repository settings, add the following secrets:
  • CLEVER_TOKEN: the token value in the credentials
  • CLEVER_SECRET: the secret value in the credentials

Extra Environment Variables

Support: introduced in v1.2.0

You can set extra environment variables on the deployed application under the setEnv option. It follows the same syntax as .env files (newline-separated, key=value).

- uses: 47ng/[email protected]
  with:
    setEnv: | # <- note the pipe here..
      FOO=bar
      EGG=spam
    # ^-- ..and the indentation here
  env:
    CLEVER_TOKEN:  ${{ secrets.CLEVER_TOKEN }}
    CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

Note: you need to use a literal block scalar | to preserve newlines in a YAML string.

Environment variables will be set before the application is deployed, to let the new deployment use them.

Caveats

Multi-line environment variable values (eg: SSH keys, X.509 certificates) are currently not supported (due to splitting on newline), but contributions are welcome.

If the deployment fails, the environment variables will still have been updated. This could be a problem if your app restarts or scales up, as the new instance would use the new variable.

In the future, we might include a way to rollback environment variables set by this action if deployment fails.

Deployment Timeout

Support: introduced in v1.2.0

Because build minutes are precious, and also because of two ongoing issues in the Clever Tools CLI ( #318, #319), you can specify a timeout in seconds after which the workflow will move on, regardless of the deployment status:

- uses: 47ng/[email protected]
  with:
    timeout: 1800 # wait at maximum 30 minutes before moving on
  env:
    CLEVER_TOKEN:  ${{ secrets.CLEVER_TOKEN }}
    CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

Force deployement

Support: introduced in v1.2.0

Clever Cloud uses a Git remote to perform deploys. By default, if the commit you want to deploy is not a fast-forward from the commit currently deployed, the deploy will be rejected. You can pass force: true to force the deploy anyway:

- uses: 47ng/[email protected]
  with:
    appID: app_facade42-cafe-babe-cafe-deadf00dbaad
    force: true
  env:
    CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
    CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

Logs

Support: introduced in v1.3.1

You can write the deployment logs to a file for archiving:

- uses: 47ng/[email protected]
  with:
    logFile: ./clever-cloud-deploy.log
  env:
    CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
    CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}
# Optional: save the file as an artifact
- uses: actions/upload-artifact@v2
  name: Upload deployment logs
  with:
    name: clever-cloud-deploy.log
    path: ./clever-cloud-deploy.log
    retention-days: 30

If your deployment process is susceptible to log secrets or PII, you can also disable it from printing onto the console, using the quiet option:

- uses: 47ng/[email protected]
  with:
    quiet: true
  env:
    CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
    CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

Annotations

The action will detect the workflow commands ::notice, ::error, and ::warning being emitted from your deployment logs, and will forward them so they can be used to annotate a run.

Note: this behaviour will be disabled if the quiet option is used.

Versioning

This action follows SemVer.

To specify the version of the action to use:

  • uses: 47ng/[email protected]: latest stable version
  • uses: 47ng/actions-clever-cloud@3e5402496b8d6492401ebb3134acfeccc25c3fce: pinned to a specific Git SHA-1 (check out the releases)
  • uses: docker://ghcr.io/47ng/actions-clever-cloud:latest: latest code from master (not recommended, as it may break: hic sunt dracones.)

Note: uses: 47ng/actions-clever-cloud@master will not use the latest code on the master branch, because the action manifest is pinned on the latest relase for performance reasons (it saves rebuilding the Docker image when consuming the action).

If you wish to test unreleased features, go through Docker directly.

Note: as of 2023-03-24, Docker images have been copied from Docker Hub (47ng/actions-clever-cloud) to GitHub Container Registry (ghcr.io/47ng/actions-clever-cloud), in response to Docker's plan to delete open source organisations on free plans.

Although they backtracked on this decision, the images are now dual-published on both platforms, and default to being downloaded from GitHub Container Registry for (seemingly) better performance.

Why ?

Clever Cloud lets you connect your GitHub repository so that any push is deployed. This is great for staging environments, but in some cases you may want to deploy to production only on specific events, like a release being published, or after a CI run.

License

MIT - Made with ❤️ by François Best

Using this action at work ? Sponsor me to help with support and maintenance.

actions-clever-cloud's People

Contributors

dcuenot avatar dependabot-preview[bot] avatar dependabot[bot] avatar franky47 avatar rik avatar spone 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

Watchers

 avatar  avatar  avatar

actions-clever-cloud's Issues

HTTP Error: 401 Authorization Required

Hello,

I've a strange issue, my token is well configured but deploy task fail with 401 Auth error.

Do you've any idea ?

/action/node_modules/.bin/clever login --token *** --secret ***
/action/node_modules/.bin/clever link app_toto --alias app_toto
Your application has been successfully linked!
/action/node_modules/.bin/clever env set --alias app_toto version 1.0.0-alpha.26
Your environment variable has been successfully saved
/action/node_modules/.bin/clever deploy --alias app_toto
Error:  HTTP Error: 401 Authorization Required
Error: The process '/action/node_modules/.bin/clever' failed with exit code 1

Deployment action hangs forever

Hi,

For whatever reason, randomly the step of deploying can hangs forever whereas the deployment is effective on Clever Cloud. Does anyone has encountered this issue?

I'm using:

      - name: Deploy to Clever Cloud
        uses: 47ng/[email protected]
        with:
          appID: ${{ env.CLEVER_APP_ID }}
          force: true
          quiet: true # disable copying into GitHub Actions all logs from Clever Cloud
        env:
          CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
          CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

I have to cancel my run after X hours to free my pipeline. Note in a normal situation it takes around 5 minutes to deploy.

image

A solution to mitigate freezing the pipeline would be to add something like timeout-minutes: 15 to the step so it warns us to check the deployment has worked or not.

Thank you,

Passing appID when it is already in a .clever.json

At the moment, the deployment process crashes when trying to deploy to a specific appID when it is already specified in an existing .clever.json.

This is because the link process will not create another entry for an existing application under a different alias (we use the appID itself as the alias for that purpose).

One (invasive) solution would be to read the .clever.json file, skip the link step if the appID passed as an argument is found, and use the associated alias for deployment.

Success Deploy infinite loop

Hello,

I am facing an issue where my Node Express application, deployed on Clever Cloud through GitHub Actions, keeps restarting in a loop immediately after launch. Here are the details:

Setup: My application is set up with a staging.yml workflow file for CI/CD on GitHub Actions and a standard Dockerfile for a Node.js application.

Behavior: The CI/CD pipeline runs successfully, and the application deploys on Clever Cloud. However, as soon as it starts, it enters a continuous restart loop.

Here are my files :

.github/workflows/staging.yml

name: CI/CD
on:
  pull_request:
  release:
    types: [created, published, edited]
  push:
    branches:
      - staging

jobs:
  ci:
    name: Integration
    runs-on: ubuntu-latest    
    
    strategy:
      matrix:
        node-version: [16.x]
    steps:
    - uses: actions/checkout@v3
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v3
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - run: npm ci
    - run: npm run build --if-present

  cd:
    name: Deployment
    needs: ci
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: 47ng/[email protected]
        with:
          appID: app_38cc...
        env:
          CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
          CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

and my basic Dockerfile

FROM node:alpine

WORKDIR /usr/app

COPY ./package.json ./

RUN npm install

COPY ./ ./

CMD ["npm", "run" ,"start"]

And here are the logs : (I suspect this is linked to the docker run command that isn't running in detached mode or something like that...)

(I hided some sensitive informations in logs with "...")

Waiting for application logs…
2024-01-09T15:27:30.446Z: WARNING: Nokogiri was built against libxml version 2.10.4, but has dynamically loaded 2.11.4
2024-01-09T15:27:31.632Z: Preparing application environment…
2024-01-09T15:27:32.011Z: Configure and enable vector.service
2024-01-09T15:27:32.887Z: Inject CC_REVERSE_PROXY_IPS
2024-01-09T15:27:32.887Z: Inject INSTANCE_NUMBER
2024-01-09T15:27:32.887Z: Inject CC_DEPLOYMENT_ID
2024-01-09T15:27:32.888Z: Inject CC_APP_NAME
2024-01-09T15:27:32.888Z: Inject CC_USE_PULSAR_LOGSCOLLECTION
2024-01-09T15:27:32.888Z: Inject CC_OWNER_ID
2024-01-09T15:27:32.888Z: Inject CC_ENVIRON_UPDATE_URL
2024-01-09T15:27:32.888Z: Inject CC_ENVIRON_UPDATE_TOKEN
2024-01-09T15:27:32.888Z: Inject INSTANCE_TYPE
2024-01-09T15:27:32.888Z: Inject CC_PRETTY_INSTANCE_NAME
2024-01-09T15:27:32.888Z: Inject PORT
2024-01-09T15:27:32.888Z: Inject INSTANCE_ID
2024-01-09T15:27:32.888Z: Inject CC_INSTANCE_ID
2024-01-09T15:27:32.888Z: Inject COMMIT_ID
2024-01-09T15:27:32.888Z: Inject CC_COMMIT_ID
2024-01-09T15:27:32.888Z: Inject APP_ID
2024-01-09T15:27:32.888Z: Inject CC_APP_ID
2024-01-09T15:27:32.888Z: Inject APP_HOME
2024-01-09T15:27:32.888Z: Added sourceable file /home/bas/applicationrc
2024-01-09T15:27:32.895Z: Checking cache data: GET /api/builds/app_38cc..../docker-20230717
2024-01-09T15:27:32.919Z: A build cache archive exists, downloading in progress…
2024-01-09T15:27:35.392Z: Successfully downloaded build cache archive
2024-01-09T15:27:35.408Z: Generating public/private ed25519 key pair.
2024-01-09T15:27:35.408Z: Your identification has been saved in /home/bas/.ssh/id_ed25519
2024-01-09T15:27:35.408Z: Your public key has been saved in /home/bas/.ssh/id_ed25519.pub
2024-01-09T15:27:35.408Z: The key fingerprint is:
2024-01-09T15:27:35.408Z: SHA256:DR2S....
2024-01-09T15:27:35.408Z: The key's randomart image is:
2024-01-09T15:27:35.408Z: +--[ED25519 256]--+
...
2024-01-09T15:27:35.408Z: +----[SHA256]-----+
2024-01-09T15:27:35.936Z: Mounting persistent file system
2024-01-09T15:27:35.940Z: No Clever Cloud specific configuration file detected. Continuing…
2024-01-09T15:27:35.940Z: using python version 2
2024-01-09T15:27:36.119Z: Changing current directory to /home/bas/app_38cc… ...
2024-01-09T15:27:36.119Z: We are now in /home/bas/app_38cc..., let's build and run the app.
2024-01-09T15:27:36.119Z: Deploying commit ID f65c0...224
2024-01-09T15:27:36.322Z: CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
2024-01-09T15:27:36.323Z: Importing image from the cache…
2024-01-09T15:27:39.582Z: Successfully got application from cache
2024-01-09T15:27:39.648Z: Got image sha256:aac...84a, let's check if it exists
2024-01-09T15:27:39.666Z: clever       latest    sha256:aac...84a   49 minutes ago   148MB
2024-01-09T15:27:39.667Z: Executing docker run -p 8080:8080 -p 4040:4040 clever
2024-01-09T15:27:39.716Z: WARNING: Published ports are discarded when using host network mode
2024-01-09T15:27:40.971Z: > [email protected] start
2024-01-09T15:27:40.971Z: > node app.js
2024-01-09T15:27:41.198Z: Example app listening on port 8080!
2024-01-09T15:27:44.667Z: Application start successful
2024-01-09T15:27:45.177Z: Successfully deployed in 0 minutes and 14 seconds
2024-01-09T15:27:45.177Z: No build cache archive was created. Not uploading anything.

Thanks for your help ❤️

Push rejected because it was not a simple fast-forward. Use "--force" to override.

Hello,

I got this error everytime I try to run the job:

Your application has been successfully linked!
/action/node_modules/.bin/clever deploy --alias app_4ca8574d-d874-4f51-a266-cab26fb38548
Remote git head commit   is e98ab5111fe052f7b507b7c95336b9a99232d4fa
Current deployed commit  is e98ab5111fe052f7b507b7c95336b9a99232d4fa
New local commit to push is ad5da503d4d712cec35847b8749f3314abfaf063 (from refs/heads/master)
Error:  Push rejected because it was not a simple fast-forward. Use "--force" to override.
Error: The process '/action/node_modules/.bin/clever' failed with exit code 1

Here is my main.yml file:

# This is a basic workflow to help you get started with Actions

name: Deploy Clever-cloud

# Controls when the action will run.
on:
  # Triggers the workflow on push or pull request events but only for the master branch
  push:
    branches: [master]
  pull_request:
    branches: [master]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - uses: actions/checkout@v2
      - run: git fetch --prune --unshallow

      - uses: 47ng/actions-clever-cloud@v1
        with:
          appID: app_XXX
        env:
          CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
          CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

Thank you for your help!

Deployment fails when pushing more than 1 commit

Hello
Thanks for your work on this action!
I guess I found a bug when there are multiple commits for one git push. There is a strange git error that looks like:

Remote git head commit   is 8d1fb81c050feeaa1d1c218951182aa6d0e3afd4
Current deployed commit  is 8d1fb81c050feeaa1d1c218951182aa6d0e3afd4
New local commit to push is 27dda380604733e415722a9929c07f4bd3c86fe3 (from refs/heads/master)
[ERROR] Failed to read git object with oid fbfbf8b1f5edc257adea57af4948f9b4e759c8c7
##[error]The process '/action/node_modules/.bin/clever' failed with exit code 1

I have not reproduced the issue using the clever cli from my laptop...
Let me know if you need anyhting

Failed to read git object

Hi,

I'm having the following error when my 47ng/actions-clever-cloud@v1 job is running :

Remote git head commit   is ...a9c7e
Current deployed commit  is ...a9c7e
New local commit to push is ...dbd47 (from refs/heads/dev)
Error:  Failed to read git object with oid ...5e06a
Error: The process '/action/node_modules/.bin/clever' failed with exit code 1

There's not much explanation in the error message. Do you know what could be the problem ?

Thanks

Improve continuous deployment

  • Use conventional commits to drive versioning
  • Use semantic-release to automate releases to:
    • Docker hub (prebuilt image with appropriate tags)
    • GitHub Actions marketplace (publish)
    • GitHub releases (release notes)

This issue serves as a documentation of the existing process, and as notes for a fully automated process.

The action can be consumed in several ways:

  • Via a GitHub owner/repo slug + version specifier, which uses the action manifest. The action manifest is always pinned to the latest stable version on Docker (though not by SHA-256), to prevent rebuilding the image for each workflow run, saving time.
  • Via a Docker reference directly (bypassing the manifest)

While pinning to the latest stable version on Docker in the manifest is great for performance, it's a pain to maintain and should be automated away.

Other places where versioning should be kept in sync are:

  • The version field in package.json
  • Documentation (always indicate the latest stable version in docs)

ENAMETOOLONG: name too long, stat

Hello,
I try to deploy on Clever Cloud from GitHub Actions, and I have this wird error from this action :

Run 47ng/actions-clever-cloud@v1
  with:
    appID: ***
  env:
    CLEVER_TOKEN: ***
    CLEVER_SECRET: ***
/usr/bin/docker run --name ngactionsclevercloudv100_5891b3 --label 1e5c35 --workdir /github/workspace --rm -e CLEVER_TOKEN -e CLEVER_SECRET -e INPUT_APPID -e INPUT_ALIAS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/assetregister-newclient/assetregister-newclient":"/github/workspace" 47ng/actions-clever-cloud:v1.0.0
/action/node_modules/.bin/clever login --token *** --secret ***
/action/node_modules/.bin/clever link *** --alias ***
Your application has been successfully linked!
/action/node_modules/.bin/clever deploy --alias ***
Error:  ENAMETOOLONG: name too long, stat '../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.git'
Error: The process '/action/node_modules/.bin/clever' failed with exit code 1

There is the job :

 deploy:
    needs: build
    runs-on: ubuntu-latest
    steps:
    - name: Deploy to Clever Cloud
      uses: 47ng/actions-clever-cloud@v1
      with:
        appID: ${{ secrets.APP_ID }}
      env: 
        CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }}
        CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }}

Some one can tell me what is my mistake ?

Erreur sur un self runner github

J'ai un soucis lorsque je lance mon job sur un self runner. J'obtiens une erreur. Mon self runner étant un container sur le docker de mon NAS, je me demande si ça ne viendrait pas de là ? Qu'en pensez vous ? Avez vous une idée de comment contourner le problème ?

Warning: Unexpected input(s) 'timeout', valid inputs are ['entryPoint', 'args', 'alias', 'appID']
Run 47ng/actions-clever-cloud@v1
/usr/bin/docker run --name ngactionsclevercloudv100_0e9deb --label c3f261 --workdir /github/workspace --rm -e CLEVER_TOKEN -e CLEVER_SECRET -e INPUT_ALIAS -e INPUT_TIMEOUT -e INPUT_APPID -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/tmp/github-runner/_temp/_github_home":"/github/home" -v "/tmp/github-runner/_temp/_github_workflow":"/github/workflow" -v "/tmp/github-runner/_temp/_runner_file_commands":"/github/file_commands" -v "/tmp/github-runner/instance-builder/instance-builder":"/github/workspace" 47ng/actions-clever-cloud:v1.0.0
docker: Error response from daemon: Bind mount failed: '/tmp/github-runner/_temp/_github_home' does not exists.

Log distribution

Provide a way to pass deployment logs to other actions. This can be:

  • Via an output variable:
- uses: 47ng/actions-clever-cloud@version
  id: deploy
  with:
    logs:
      output: true
- run: echo ${{ steps.deploy.outputs.logs }}
  • Via the filesystem:
- uses: 47ng/actions-clever-cloud@version
  with:
    logs:
      file: ./path/to/file.log # resolved as relative to repository root

Or a combination of those options.

Because logs are printed to the standard output by the Clever Tools CLI, a way to hide them if they contain sensitive data could also be useful:

- uses: 47ng/actions-clever-cloud@version
  with:
    logs:
      stdout: false

Is it possible to use --force option ?

Hey, first of all, thanks for your work ! ;)

I have a question, is it possible to use the --force when executing clever deploy ?

Actually, I can't deploy to Clever Cloud because of the following error:
/action/node_modules/.bin/clever deploy --alias xxx ... [ERROR] Push rejected because it was not a simple fast-forward. Use "--force" to override. ##[error]The process '/action/node_modules/.bin/clever' failed with exit code 1

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.