github-actions

How to reference 'environment' in github action workflow?

浪子不回头ぞ 提交于 2021-02-11 12:20:50
问题 I have the environment created named "main", but the workflow below errors out: environment created: Below is my github workflow: name: Deploy ADf ARM on: workflow_dispatch: environment: name: main jobs: build-and-deploy: runs-on: ubuntu-latest steps: # Checkout code - uses: actions/checkout@main ... at present it notes the error: The workflow is not valid. .github/workflows/deploy-adf-arm.yml (Line: 7, Col: 1): Unexpected value 'environment' How can I reference this environment to work? 回答1:

Can't find my python module after installing on Github Actions

你离开我真会死。 提交于 2021-02-11 07:00:15
问题 When I install my example module in the local environment, python is able to find it when the module is imported. Whereas, when executed by Github Actions, the workflow fails and the reported error is that my module (ci-test) is not installed. main.yaml: - name: Install ci-test package run: | python setup.py build python setup.py install python -c "import ci_test" The full yaml file is located here. And the error output of Github Actions is: Installed /home/runner/.local/lib/python3.7/site

Run GitHub Action on multiple environments

和自甴很熟 提交于 2021-02-10 19:59:24
问题 Currently what I want to do is to run the GitHub Actions on more than one environment, let's say on windows and linux. I managed to do it with the Travis CI, but I could not find information about how to do it with GitHub Actions. Has anyone tried it? Currently, this is my nodejs.yml. name: Node CI on: [push] jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [12.x] steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1

github actions can not find package.json

我们两清 提交于 2021-02-10 15:07:36
问题 I'm trying to set-up some basic GitHub action to write comments on the PRs. Action is published on github and looks like this: action.yml file: name: !!name!! description: !!description!! author: !!me!! inputs: token: description: "Github token" required: true runs: using: "node12" main: "index.js" index.js file: const core = require("@actions/core"); const { execSync } = require("child_process"); const { GitHub, context } = require("@actions/github"); const main = async () => { const

GitHub Actions workflow error: Run Command Timeout! Even if the script did well

◇◆丶佛笑我妖孽 提交于 2021-02-09 01:44:16
问题 I want to deploy my Nuxt.js application on my remote server each time I commit into repository. Here is my deploy.yml: name: 'Deployment' on: push: branches: ['master'] jobs: deploy: name: Deploy runs-on: ubuntu-latest steps: - name: Connect to SSH uses: appleboy/ssh-action@master with: host: webhostgb.com username: root key: ${{ secrets.PRIVATE_KEY }} port: 22 script: | cd whgb-new git pull origin master npm run build fuser -kn tcp 3000 pm2 restart deploy.sh Basically deploy.sh runs npm

GitHub Actions workflow error: Run Command Timeout! Even if the script did well

梦想与她 提交于 2021-02-09 01:41:57
问题 I want to deploy my Nuxt.js application on my remote server each time I commit into repository. Here is my deploy.yml: name: 'Deployment' on: push: branches: ['master'] jobs: deploy: name: Deploy runs-on: ubuntu-latest steps: - name: Connect to SSH uses: appleboy/ssh-action@master with: host: webhostgb.com username: root key: ${{ secrets.PRIVATE_KEY }} port: 22 script: | cd whgb-new git pull origin master npm run build fuser -kn tcp 3000 pm2 restart deploy.sh Basically deploy.sh runs npm

Reuse portion of github action across jobs

£可爱£侵袭症+ 提交于 2021-02-08 14:18:13
问题 I have a workflow for CI in a monorepo, for this workflow two projects end up being built. The jobs run fine, however, I'm wondering if there is a way to remove the duplication in this workflow.yml file with the setting up of the runner for the job. I have them split so they run in parallel as they do not rely on one another and to be faster to complete. It's a big time difference in 5 minutes vs. 10+ when waiting for the CI to finish. jobs: job1: name: PT.W Build runs-on: macos-latest steps:

How do I use an env file with GitHub Actions?

混江龙づ霸主 提交于 2021-02-08 13:53:11
问题 I have multiple environments (dev, qa, prod) and I'm using .env files to store secrets etc... Now I'm switching to GitHub Actions, and I want to use my .env files and declare them into the env section of the github actions yml. But from what I've seen so far, it seems that I can not set a file path and I have to manually re-declared all variables. How should I proceed as best practice? 回答1: Edit: You were using Circleci Contexts, so with that you had a set of secrets of each env. I know they

npm install in GitHub Action fails with “ENOENT: no such file or directory” - Works fine elsewhere

我是研究僧i 提交于 2021-02-08 13:29:14
问题 I am currently working on replacing our Drone CI installation with GitHub Actions. The Action Workflow I have so far boils down to the following .github/workflows/ci.yml file: on: [ push, pull_request ] name: CI jobs: test: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Install Node uses: actions/setup-node@v1 with: node-version: '13.x' - name: Install Dependencies run: npm install The log itself comes out as a long series of npm WARN tar ENOENT: no such file

Running kubectl patch --local fails due to missing config

三世轮回 提交于 2021-02-08 11:33:23
问题 I have a GitHub Actions workflow that substitutes value in a deployment manifest. I use kubectl patch --local=true to update the image. This used to work flawlessly until now. Today the workflow started to fail with a Missing or incomplete configuration info error. I am running kubectl with --local flag so the config should not be needed. Does anyone know what could be the reason why kubectl suddenly started requiring a config? I can't find any useful info in Kubernetes GitHub issues and