github-actions

Caching APT packages in GitHub Actions workflow

末鹿安然 提交于 2020-05-25 17:06:08
问题 I use the following Github Actions workflow for my C project. The workflow finishes in ~40 seconds, but more than half of that time is spent by installing the valgrind package and its dependencies. I believe caching could help me speed up the workflow. I do not mind waiting a couple of extra seconds, but this just seems like a pointless waste of GitHub's resources. name: C Workflow on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: make run

How to set secrets in Github Actions?

↘锁芯ラ 提交于 2020-05-13 06:05:50
问题 The official boilerplate code injects the npm token as follows NODE_AUTH_TOKEN: ${{secrets.npm_token}} How do I access and set this variable? I cant find it in the GUI. 回答1: Go to your project in Github Select the Settings tab Click the Secrets section in the left hand menu Add a new secret and provide a name (e.g. npm_token ) and a value. 回答2: This page is hard to find, but it exists in the official docs here: Creating and using secrets (encrypted variables). Copied from the docs below for

How to add privileges to the nt authority\network service account for GitHub Actions?

[亡魂溺海] 提交于 2020-04-18 06:14:41
问题 GitHub Actions self-hosted runners run under the nt authority\network service account. According to https://docs.microsoft.com/en-us/windows/win32/services/networkservice-account: It has minimum privileges on the local computer and acts as the computer on the network. I am trying to use a GitHub Actions self-hosted runner to deploy an app to my server. To do this I need to access schtasks.exe which currently gives ERROR: Access is denied. How can I give privileges to nt authority\network

How to add privileges to the nt authority\network service account for GitHub Actions?

不羁岁月 提交于 2020-04-18 06:14:32
问题 GitHub Actions self-hosted runners run under the nt authority\network service account. According to https://docs.microsoft.com/en-us/windows/win32/services/networkservice-account: It has minimum privileges on the local computer and acts as the computer on the network. I am trying to use a GitHub Actions self-hosted runner to deploy an app to my server. To do this I need to access schtasks.exe which currently gives ERROR: Access is denied. How can I give privileges to nt authority\network

GitHub Actions: env: Use pre-defined environment variables on RHS within env section

半城伤御伤魂 提交于 2020-04-16 05:14:50
问题 I would like to declare some environment variables in a top level env section in my main.yml whose values use some pre-defined environment variables such as those documented in the GitHub Actions documentation. However, it appears I cannot use those pre-defined variables in the right hand side of my env section. For example: env: resourceGroup: ${GITHUB_RUN_ID}${GITHUB_RUN_NUMBER} Is there a way to make it so any step that needs ${resourceGroup} can get it without having to manually define it

GitHub Actions: env: Use pre-defined environment variables on RHS within env section

廉价感情. 提交于 2020-04-16 05:14:33
问题 I would like to declare some environment variables in a top level env section in my main.yml whose values use some pre-defined environment variables such as those documented in the GitHub Actions documentation. However, it appears I cannot use those pre-defined variables in the right hand side of my env section. For example: env: resourceGroup: ${GITHUB_RUN_ID}${GITHUB_RUN_NUMBER} Is there a way to make it so any step that needs ${resourceGroup} can get it without having to manually define it

No GitHub Actions workflows detected in repository

空扰寡人 提交于 2020-04-16 02:43:30
问题 I am trying to build and push a docker image to Amazon ECR with GitHub Actions by following this tutorial I'm trying to set up GitHub Actions for this repo, so I've created a new workflow in the .github/workflows directory. The DockerFile is successfully created and build. Now, after creating build.yml and committing it into the master branch ,when I go to the "Actions" tab in the repository no workflows are shown. I'm thinking that probably there is an issue in the .yml file but no error is

Error: unable to prepare context: path “ ” not found while building and tagging docker image

倾然丶 夕夏残阳落幕 提交于 2020-04-11 04:30:07
问题 In continuation of my previous question I am trying to build and push a docker image to Amazon ECR with GitHub Actions by following this tutorial But I am getting the following error : Run docker build \ unable to prepare context: path " " not found Can anyone help me resolve this issue?? Edit 1: As stated by @banyan I have created an app directory But still I am getting the same error. To know more, please go through this 回答1: There is issue in this line of your dockerfile: docker build \ -t

Installed 'github-autostatus' plugin not updating Job & stage monitoring status in GitHub

£可爱£侵袭症+ 提交于 2020-03-21 07:00:32
问题 Installed https://plugins.jenkins.io/github-autostatus/ plugin Watches pipeline jobs and provides job and stage stats such as time and pass/fail. Can be configured to update GitHub commit status (one status per stage) and send stats to an InfluxDB instance, or StatsD collector, for build health monitoring of job/stage timing and success rate. As highlighted in link, I am expecting this to appear in stage before PR merge to target button gets enabled. But post plugin installation & restart it

How to see what Maven is sending to a server during deploy?

跟風遠走 提交于 2020-03-02 19:33:38
问题 I'm trying to use Github's new Actions CI server to deploy packages to Github's new packages feature. It's not going well. I think it's all set up correctly, but I get this error: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project myproject: Failed to deploy artifacts: Could not find artifact com.mycompany:myproject:pom:1.5 in github (https://maven.pkg.github.com/mycompany/mycompany_repository) -> [Help 1] This happens after it appears