github-actions

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

孤者浪人 提交于 2020-03-02 19:31:46
问题 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

GitHub Actions CI Conditional Regex

独自空忆成欢 提交于 2020-02-28 05:58:06
问题 I'm trying to move my CI workflow from CircleCI to GitHub Actions. The last major struggle I'm facing is with deployment. Currently my workflow is such that when I push a tag to my GitHub repo, it will run the tests, then run the deployment. Only thing is CircleCI filters tags to only run the job if the tag matches the regex: /v[0-9]+(\.[0-9]+)*/ . How can I check to ensure the tag I pushed matches the regex pattern above before running the deployment? I currently have the following GitHub

What does the http request to trigger a deployment event look like?

雨燕双飞 提交于 2020-02-06 08:03:24
问题 I want to fire a deployment event but I don't really understand the http request I need to send in order for it to work. What does minimal request look like? curl -vvv is good, since I'll be doing it with shell. 回答1: The event you linked is generated when a deployment occurs. So I think what you actually want to do is create a deployment? To create a deployment during a GitHub actions step with curl it should look something like the following. See the documentation here for details of other

Does Github Actions have templates

时光怂恿深爱的人放手 提交于 2020-01-25 08:14:21
问题 As I have repetitve steps in my Github Actions, I would like to create a template. Let's make a example name: ci on: ["push"] jobs: build-and-test: strategy: matrix: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: checkout uses: actions/checkout@v1 - name: do stuff run: | bash stuff Is it possible to save only the steps in a separated file? And import afterwards? 回答1: Unfortunately it does not look like github-actions supports reusing workflows. Not even YAML anchors are

How to see logs of cancelled steps in Github Actions?

冷暖自知 提交于 2020-01-25 07:04:10
问题 I have a step in my workflow where I run a command (python script). This python script appears to be hanging somewhere in the middle of the execution - GitHub shows the step as running it's stuck and nothing happens. To debug this, I would want to see the log output of the python script. How can I achieve that? 回答1: You can enable Debug Logging by adding secrets: To debug a runner: ACTIONS_RUNNER_DEBUG set to true To debug each step: ACTIONS_STEP_DEBUG set to true 来源: https://stackoverflow

How to add working directory to deployment in GitHub actions

梦想与她 提交于 2020-01-25 02:54:08
问题 I recently moved into GitHub actions, so what I'm trying to do is host my react project in firebase when a push is done. And I used GitHub actions to this CI/CD process. And this is the main.yml that I have right now. name: Build and Deploy on: push: branches: - master jobs: build: name: Build runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@master - name: Install Dependencies working-directory: ./my-app run: npm install - name: Build working-directory: ./my-app run:

How can I reject push from repository members using github actions?

萝らか妹 提交于 2020-01-24 15:35:07
问题 My task is as follows: upon receive of a new commits (by single push), it is necessary to perform a github action, which would send the task to test on a test server via ssh (with git pull and npm test). Then, if testing fails, this push (all commits in it) should be canceled. With the first part, it seems, there are no problems, but I can’t figure out how to implement the second part, that is, canceling the push. Thank you for your attention to the question! 回答1: You can't use GitHub Actions

Running a Powershell script from a node program in a GitHub action

心已入冬 提交于 2020-01-24 12:14:14
问题 Well, yes, that's a thing. After trying to run the PS script directly and failing, let's try the roundabout way of running it from a node script, which are legit in the GitHub actions environment. So after many attempts, here's my last one (taken from this answer: var spawn = require("child_process").spawn,child; var workspace = process.env.GITHUB_WORKSPACE; var file = workspace + "\\upgrade.ps1"; console.log( "Workspace ", workspace, " file ", file ); child = spawn("powershell.exe",[ file ])

Running a Powershell script from a node program in a GitHub action

﹥>﹥吖頭↗ 提交于 2020-01-24 12:13:09
问题 Well, yes, that's a thing. After trying to run the PS script directly and failing, let's try the roundabout way of running it from a node script, which are legit in the GitHub actions environment. So after many attempts, here's my last one (taken from this answer: var spawn = require("child_process").spawn,child; var workspace = process.env.GITHUB_WORKSPACE; var file = workspace + "\\upgrade.ps1"; console.log( "Workspace ", workspace, " file ", file ); child = spawn("powershell.exe",[ file ])

GitHub Action: How do I run commands inside a docker container

女生的网名这么多〃 提交于 2020-01-16 18:22:51
问题 Just started learning about CI/CD today. Didn't know what docker was previous to today. I was able to get CD working on CircleCI with my Unity project. All of the run commands were happening inside the docker container. version: 2.1 executors: unity: docker: # https://hub.docker.com/r/gableroux/unity3d/tags - image: gableroux/unity3d:2018.2.21f1 jobs: build-test: executor: unity steps: - checkout # Install zip - run: apt-get update - run: apt-get install zip -y # Decrypt the license file -