github-actions

How to test with different versions of PHP in a GitHub Action

痞子三分冷 提交于 2021-02-18 21:12:58
问题 I have some PHP code with tests which run using PHPUnit and wanted to test it on GitHub Actions . I could not find a method in their documentation for testing PHP packages. I want to test using different versions of PHP, but they only have the latest one 7.3 installed. 回答1: You can add this setup-php action in your workflow. If not present, it installs the PHP version(s) you specify with required extensions and various tools like composer. It supports all the virtual environments supported by

How to test with different versions of PHP in a GitHub Action

帅比萌擦擦* 提交于 2021-02-18 21:10:48
问题 I have some PHP code with tests which run using PHPUnit and wanted to test it on GitHub Actions . I could not find a method in their documentation for testing PHP packages. I want to test using different versions of PHP, but they only have the latest one 7.3 installed. 回答1: You can add this setup-php action in your workflow. If not present, it installs the PHP version(s) you specify with required extensions and various tools like composer. It supports all the virtual environments supported by

Is it possible to find out, via the GitHub API, if an issue has been closed via a pull request

…衆ロ難τιáo~ 提交于 2021-02-18 18:12:54
问题 I'm using github-script for GitHub actions, which allows you to easily access GitHub API. I'm trying to check if an issue has not been closed by clicking on the "close button", that is, via a commit or via merging a pull request that includes a closing commit (or closes in the PR body). However, there does not seem an easy way to do that. This is the event information the GitHub API returns: If the issue has been closed from a commit, it adds the commit_id If the issue has been closed from

how to make a github action matrix element conditional

非 Y 不嫁゛ 提交于 2021-02-18 12:54:34
问题 I have a workflow that uses 'strategy' = 'matrix' and a list of specific configurations to build. Link to Workflow YAML (also provided below) # # build-N-test-v2.1-Dev and build-N-test-v2.1-Release are neary # identical, but a few tests are commented out (to not needlessly stress CI system) # for v2.1-Dev builds # # NOTE: I've tried many tricks - none which seem to work - to get this working on one file with one # workflow and tests # https://github.community/t/what-is-the-correct-if

Only run GitHub Actions manually while blocking Pull Request

只愿长相守 提交于 2021-02-16 20:08:49
问题 I have a set of GitHub Actions configured to block pull requests from being merged until the Actions complete successfully. However, every time a new commit is pushed to a PR, the Actions are run again, which can be very wasteful if the author is not yet ready to merge, and intends to make future changes. Is there any way to have a GitHub Action still block a PR being merged but also not run the Action automatically? 回答1: With this recent update you can now convert pull requests back to draft

Only run GitHub Actions manually while blocking Pull Request

梦想的初衷 提交于 2021-02-16 20:08:33
问题 I have a set of GitHub Actions configured to block pull requests from being merged until the Actions complete successfully. However, every time a new commit is pushed to a PR, the Actions are run again, which can be very wasteful if the author is not yet ready to merge, and intends to make future changes. Is there any way to have a GitHub Action still block a PR being merged but also not run the Action automatically? 回答1: With this recent update you can now convert pull requests back to draft

How to cache docker-compose build inside github-action

你离开我真会死。 提交于 2021-02-16 02:58:08
问题 Is there any way to cache docker-compose so that it will not build again and again? here is my action workflow file: name: Github Action on: push: branches: - staging jobs: test: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - name: Bootstrap app on Ubuntu uses: actions/setup-node@v1 with: node-version: '12' - name: Install global packages run: npm install -g yarn prisma - name: Install project deps if: steps.cache-yarn.outputs.cache-hit != 'true' run: yarn - name: Build docker

How to cache docker-compose build inside github-action

风流意气都作罢 提交于 2021-02-16 02:51:00
问题 Is there any way to cache docker-compose so that it will not build again and again? here is my action workflow file: name: Github Action on: push: branches: - staging jobs: test: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - name: Bootstrap app on Ubuntu uses: actions/setup-node@v1 with: node-version: '12' - name: Install global packages run: npm install -g yarn prisma - name: Install project deps if: steps.cache-yarn.outputs.cache-hit != 'true' run: yarn - name: Build docker

How to cache docker-compose build inside github-action

不羁的心 提交于 2021-02-16 02:49:40
问题 Is there any way to cache docker-compose so that it will not build again and again? here is my action workflow file: name: Github Action on: push: branches: - staging jobs: test: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - name: Bootstrap app on Ubuntu uses: actions/setup-node@v1 with: node-version: '12' - name: Install global packages run: npm install -g yarn prisma - name: Install project deps if: steps.cache-yarn.outputs.cache-hit != 'true' run: yarn - name: Build docker

GitHub Action error: “Top level 'runs:' section is required”

风格不统一 提交于 2021-02-11 17:38:51
问题 I am trying to get a private GitHub action to work within my private GitHub org. The private repo that contains these workflow 'templates' has this simple file structure as I'm just trying to get the bare minimum to work: . ├── .git ├── test │ ├── action.yml And the action.yml file contents are: name: Test on: push jobs: test: name: Test runs-on: ubuntu-latest steps: - name: Echo run: | echo Heyyyyy I am trying to use this action in another private repo with a workflow file with these