github-actions

Running kubectl patch --local fails due to missing config

妖精的绣舞 提交于 2021-02-08 11:33:01
问题 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

How to set up actions in GitHub for new user?

不想你离开。 提交于 2021-02-08 08:32:15
问题 I just got a GitHub account and writing small scripts in Python which I am learning. While adding my code to GitHub I noticed there is an option to run tests/validation on my code but mine is empty. I googled around and found that lint and black and are good checks. I found this Action that I want to add - https://github.com/marketplace/actions/python-quality-and-format-checker There is a "script" and a "config" that I think I need to add/update somewhere. Also when I click "Use latest

How to set up actions in GitHub for new user?

匆匆过客 提交于 2021-02-08 08:31:53
问题 I just got a GitHub account and writing small scripts in Python which I am learning. While adding my code to GitHub I noticed there is an option to run tests/validation on my code but mine is empty. I googled around and found that lint and black and are good checks. I found this Action that I want to add - https://github.com/marketplace/actions/python-quality-and-format-checker There is a "script" and a "config" that I think I need to add/update somewhere. Also when I click "Use latest

How to pass the output of a bash command to Github Action parameter

与世无争的帅哥 提交于 2021-02-07 06:34:30
问题 I have a workflow where after a push to master I want to create a release and upload an asset to it. I'm using actions/create-release@v1 and actions/upload-release-asset@v1 . I would like to pass the outputs of a bash commands to the action parameters. However I found out the syntax of "$(command)" does not work. How can I pass the output of a bash command to an action's parameter. For example I'd like to do something like this: - name: Create Release id: create_release uses: actions/create

How to pass the output of a bash command to Github Action parameter

你说的曾经没有我的故事 提交于 2021-02-07 06:34:09
问题 I have a workflow where after a push to master I want to create a release and upload an asset to it. I'm using actions/create-release@v1 and actions/upload-release-asset@v1 . I would like to pass the outputs of a bash commands to the action parameters. However I found out the syntax of "$(command)" does not work. How can I pass the output of a bash command to an action's parameter. For example I'd like to do something like this: - name: Create Release id: create_release uses: actions/create

Github Actions: How use strategy/matrix with script

隐身守侯 提交于 2021-02-06 11:00:49
问题 I have workflow that needs to have a loop for the steps, which is perfect with strategy/matrix. The only problem is that strategy/matrix needs to be set by a constant. Is it possible to use strategy matrix with a output of a script? name: tests on: [push] jobs: test: runs-on: ${{ ubuntu-latest }} strategy: fail-fast: false matrix: versions: $(./script.py) steps: - uses: actions/checkout@v2 ....... 回答1: You can generate matrix in JSON in one job and set it to the second job. GitHub added this

Github Actions: How use strategy/matrix with script

為{幸葍}努か 提交于 2021-02-06 10:59:25
问题 I have workflow that needs to have a loop for the steps, which is perfect with strategy/matrix. The only problem is that strategy/matrix needs to be set by a constant. Is it possible to use strategy matrix with a output of a script? name: tests on: [push] jobs: test: runs-on: ${{ ubuntu-latest }} strategy: fail-fast: false matrix: versions: $(./script.py) steps: - uses: actions/checkout@v2 ....... 回答1: You can generate matrix in JSON in one job and set it to the second job. GitHub added this

How to reference context values in GitHub Actions expression syntax?

牧云@^-^@ 提交于 2021-02-04 18:18:07
问题 I want to set an environment variable in the env: section of a GitHub Action and make use of the Contexts and expression syntax for GitHub Actions. I tried this: jobs: build: runs-on: ubuntu-latest env: MYVAR: ${{ format('{0}:{1}', ${{ env.PATH }}, ${{ env.HOME }} ) }} steps: - name: Check environment run: echo $MYVAR This results in the error message: ### ERRORED 10:45:52Z - Your workflow file was invalid: The pipeline is not valid. .github/workflows/main.yml (Line: 10, Col: 14): Unexpected

How to reference context values in GitHub Actions expression syntax?

倾然丶 夕夏残阳落幕 提交于 2021-02-04 18:18:05
问题 I want to set an environment variable in the env: section of a GitHub Action and make use of the Contexts and expression syntax for GitHub Actions. I tried this: jobs: build: runs-on: ubuntu-latest env: MYVAR: ${{ format('{0}:{1}', ${{ env.PATH }}, ${{ env.HOME }} ) }} steps: - name: Check environment run: echo $MYVAR This results in the error message: ### ERRORED 10:45:52Z - Your workflow file was invalid: The pipeline is not valid. .github/workflows/main.yml (Line: 10, Col: 14): Unexpected

Service elasticsearch is not visible when run tests

こ雲淡風輕ζ 提交于 2021-02-04 08:14:46
问题 name: Rspec on: [push] jobs: build: runs-on: [self-hosted, linux] services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:7.9.2 env: discovery.type: single-node options: >- --health-cmd "curl http://localhost:9200/_cluster/health" --health-interval 10s --health-timeout 5s --health-retries 10 redis: image: redis options: --entrypoint redis-server steps: - uses: actions/checkout@v2 - name: running tests run: | sleep 60 curl -X GET http://elasticsearch:9200/ I am running