github-actions

deploy to Github Package Registry from Github Action

◇◆丶佛笑我妖孽 提交于 2019-12-06 08:01:21
问题 I would like to deploy to a GitHub Package Registry from a GitHub Action of a public repo. I have a yml file for a workflow: name: My CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Install dependencies run: lein deps - name: Run tests run: lein test - name: Generate pom run: lein pom - name: Deploy run: mvn deploy I use Leiningen to build the project and generate a POM file. Then I would like to use Maven to deploy the artifact to the GitHub

How do i set an env var with a bash expression in GitHub Actions?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 02:27:19
问题 In GitHub Actions i'd like to evaluate a bash expression and then assign it to an environment variable - - name: Tag image env: GITHUB_SHA_SHORT: ${{ $(echo $GITHUB_SHA | cut -c 1-6) }} ..do other things... However this naive attempt has failed. According to the docs this doesn't seem to be supported however a somewhat clean workaround would be fine. 回答1: Using set-env in a previous step works for me. name: my workflow on: push jobs: build: runs-on: ubuntu-latest steps: - uses: actions

Only run job on specific branch with GitHub Actions

十年热恋 提交于 2019-12-04 23:46:48
问题 I'm relatively new to GitHub Actions and I have 2 jobs–one that runs my tests, and one that deploys my project onto a server. Obviously I want the tests to run on every branch, but deploying should only happen when something gets pushed to master. I'm struggling to find a way to run a job on a specific branch. I know it's possible to only run entire workflows on a specific branch, however that would mean I would have a "test" workflow and a "deploy" workflow. This sounds like a solution,

Github actions share workspace/artifacts between jobs?

天大地大妈咪最大 提交于 2019-12-03 11:00:11
问题 Trying to use Github's beta actions, I have two jobs, one that builds the code and then one that will deploy code. However, I can't seem to get the build artifact in deploy job. My latest attempt is to manually set a container image with the same volumes for each job, according to docs this should be solution: https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes Sets an array of volumes for the container to use. You can use volumes to share data

New location of docker actions

匆匆过客 提交于 2019-12-01 13:32:29
I was using this for docker: - name: Build container image uses: actions/docker/cli@master with: ///// removed - name: Docker Login uses: actions/docker/login@master env: ///// removed However github.com/actions/docker do not seem to exist anymore. My builds are giving 404: Failed to download action ' https://api.github.com/repos/actions/docker/tarball/master '. Error Response status code does not indicate success: 404 (Not Found). Does anyone know the new location? The actions/docker action has now been deprecated. The repository was archived with the following message before being deleted

New location of docker actions

旧城冷巷雨未停 提交于 2019-12-01 11:06:08
问题 I was using this for docker: - name: Build container image uses: actions/docker/cli@master with: ///// removed - name: Docker Login uses: actions/docker/login@master env: ///// removed However github.com/actions/docker do not seem to exist anymore. My builds are giving 404: Failed to download action 'https://api.github.com/repos/actions/docker/tarball/master'. Error Response status code does not indicate success: 404 (Not Found). Does anyone know the new location? 回答1: The actions/docker

Unable to commit and push back changes made by github action (invalid user)

泄露秘密 提交于 2019-12-01 06:52:06
问题 I have following step at the end of my action workflow. It runs when code is pushed to master, the idea is to commit all files changed by github action back to master once this action finishes. - name: Commit and push changes run: | git config --global user.name 'myGithubUserName' git config --global user.email 'myEmail@gmail.com' git add -A git commit -m "Increased build number [skip ci]" git push -u origin HEAD However I keep getting following error, even though I am configuring user and

Making pull requests to a GitHub repository automatically with GitHub Actions

僤鯓⒐⒋嵵緔 提交于 2019-11-29 23:12:57
问题 I have a file in a GitHub repository that needs updating occasionally by running a command. As part of a GitHub Workflows, I want to have a bot running a command, and seeing if it creates a diff on the repo, and if so, make a pull request to the repository automatically. I have a suspicion that the GitHub Workflows can help me do that as GitHub now lets people run arbitrary containers ("Actions") that do stuff like builds in a repository. I see some official automation workflows that let you