25 messages
Discussions related to GitHub Actions
samuelalmost 3 years ago
Hi, good morning
I am new to github Action, I have this worflow that working ok
name: Deploy
on: [push]
jobs: deploy:
runs-on: ubuntu-latest
steps: - uses: actions/checkout@master - name: Copiar el contenido del repositorio con scp uses: appleboy/scp-action@master env: HOST: ${{ secrets.HOST }} USERNAME: ${{ secrets.USERNAME }} PORT: ${{ secrets.PORT }} KEY: ${{ secrets.SSHKEY }} with: source: "pagweb/, app/" target: "/var/www/html, /var/www" strip_components: 1
I am new to github Action, I have this worflow that working ok
name: Deploy
on: [push]
jobs: deploy:
runs-on: ubuntu-latest
steps: - uses: actions/checkout@master - name: Copiar el contenido del repositorio con scp uses: appleboy/scp-action@master env: HOST: ${{ secrets.HOST }} USERNAME: ${{ secrets.USERNAME }} PORT: ${{ secrets.PORT }} KEY: ${{ secrets.SSHKEY }} with: source: "pagweb/, app/" target: "/var/www/html, /var/www" strip_components: 1
samuelalmost 3 years ago
when the files are copied the content of the two sources is copied, I want that
webpage is copied to /var/www/html
and the app is copied to another destination example var/www
webpage is copied to /var/www/html
and the app is copied to another destination example var/www
samuelalmost 3 years ago
what could be doing wrong
Darren Cunninghamalmost 3 years ago
please wrap in a code block (three backticks) so the formatting isn’t jacked
Darren Cunninghamalmost 3 years ago
initial guess is that it doesn’t look like scp-action supports directories
target - target path on the server
source - scp file listDarren Cunninghamalmost 3 years ago
also be cautious about using
@master when using public GH actions — I suggest using the explicit sha for a commit to better protect yourself. while unlikely, it’s an attack vector to just blindly always run the latest version of a GH action. meaning, if somebody was able to add malicious code they could access the host, username & password you’re using in this case.Pawel Reinalmost 3 years ago
What do people use for monitoring / metrics collection from github actions runs? I found meercode.io mentioned in older conversations. Is there a way to use Grafana?
johncblandiialmost 3 years ago
Adding this to our pre-commit GHA helps keep our stacks formatted consistently.
.yamlfmt
GHA in thread
.pre-commit-config.yamlrepos:
- repo: <https://github.com/google/yamlfmt>
rev: v0.9.0
hooks:
- id: yamlfmt
- repo: <https://github.com/antonbabenko/pre-commit-terraform>
rev: v1.77.1
hooks:
- id: terraform_fmt
- id: terraform_docs
args: ["--args=--lockfile=false"].yamlfmt
formatter:
type: basic
retain_line_breaks: true
indentless_arrays: false
drop_merge_tag: trueGHA in thread
rssalmost 3 years ago(edited)
Manage caches in your Actions workflows from Web Interface
Caching dependencies and other commonly reused files enables developers to speed up their GitHub Actions workflows and make them more efficient. We have now enabled Cache Management from the web interface to enable developers to get more transparency and control over their cache usage within their GitHub repositories. Actions users who use actions/cache can now: […]
Caching dependencies and other commonly reused files enables developers to speed up their GitHub Actions workflows and make them more efficient. We have now enabled Cache Management from the web interface to enable developers to get more transparency and control over their cache usage within their GitHub repositories. Actions users who use actions/cache can now: […]
hatzalmost 3 years ago
Hey all, I am attempting to use the
This is the error I'm getting
Here's some more output:
github-action-matrix-outputs-write github action and facing an unexpected error that I'm hoping I can get some assistance with. Here is the usage of the action: - uses: cloudposse/github-action-matrix-outputs-write@0.3.1
if: ${{ inputs.monorepo == 'true' }}
id: out
with:
matrix-step-name: ${{ github.job }}
matrix-key: ${{ env.APPLICATION_NAME }}
outputs: |-
comment: ${{ env.URL }}This is the error I'm getting
Error: bad file '-': yaml: mapping values are not allowed in this contextHere's some more output:
Copying to tool cache
Run JSON=$(echo "comment: URL for deploy: <https://frontend-docs-259.website.dev>" | yq '. + {}' -o json | jq . -c -M -e)
JSON=$(echo "comment: URL for deploy: <https://frontend-docs-259.website.dev>" | yq '. + {}' -o json | jq . -c -M -e)
echo "result=${JSON}" >> $GITHUB_OUTPUThatzalmost 3 years ago
@Igor Rodionov ^ it looks like you're a primary contributor on this action
hatzalmost 3 years ago
After some more testing it kinda seems like the
- character in my url is what's causing the issue. If I just have a comment of "Hello World" it seems to work, so maybe this is just needing to figure out some syntaxIgor Rodionovalmost 3 years ago
@hatz Hello.
Thanks for your question.
Let me try to reproduce the issue
Thanks for your question.
Let me try to reproduce the issue
samuelalmost 3 years ago(edited)
Hi good afternoon everybody, I tray aneble githubaction in a github Enterprise, to done this I need setting a s3 bucket, but I am have issue, this could be that I am doing something wrong
rssalmost 3 years ago(edited)
GitHub Actions: Create and share your own deployment protection rules for safe and controlled deployments
GitHub Actions: Create and share your own deployment protection rules for safe and controlled deployments
GitHub Actions: Create and share your own deployment protection rules for safe and controlled deployments
rssalmost 3 years ago(edited)
GitHub Actions: macOS 13 is now available
GitHub Actions: macOS 13 is now available
GitHub Actions: macOS 13 is now available
rssalmost 3 years ago(edited)
GitHub Actions: Faster macOS runners are now available in open public beta!
GitHub Actions: Faster macOS runners are now available in open public beta!
GitHub Actions: Faster macOS runners are now available in open public beta!
rssalmost 3 years ago(edited)
GitHub Actions Importer Feature Flags
GitHub Actions Importer Feature Flags
GitHub Actions Importer Feature Flags
Erik Osterman (Cloud Posse)almost 3 years ago
Upvotes welcome! https://github.com/release-drafter/release-drafter/issues/1339
hatzalmost 3 years ago
Is it possible for someone to check out PR I have open on one of the cloudposse github actions? https://github.com/cloudposse/github-action-matrix-outputs-write/pull/20
Igor Rodionovalmost 3 years ago
@hatz let me check
Igor Rodionovalmost 3 years ago
@hatz I approved and merged the PR
Igor Rodionovalmost 3 years ago
thanks for you contribution.
this is the nice catch
this is the nice catch
Igor Rodionovalmost 3 years ago
Soren Jensenalmost 3 years ago
Hi All, I got some issues with our setup of GitHub and tests before merging into main.
We are working with a single mono repo with the following structure.
Each module has its own folder with a nice mixture between terraform, python and nodejs files. and it's own pipeline defined in .github
We got a few share libs with code used in multiple modules which triggers multiple pipelines. E.g. a chance in the shared_lib will trigger the pipelines for all our api's.
Pipeline for aws_core got the following triggers:
Pipeline for the data_api
Pipeline for shared_lib
Each pipeline got it's own test job, the first problem is when opening up a PR to merge a branch into main if you select Auto-Merge it merges before all the pipelines has completed, so some tests might fail after the merge is complete breaking prod. 💥
The second problem is as you can see in the pipelines above they are only triggered on certain changes as we only want the relevant pipelines to run when working on a branch. It's common we modify code in multiple modules on the same branch, e.g. a change there require a new endpoint in the api and a change in the client. Committing this step by step will trigger one pipeline and in next commit another. Before merging into main it would be nice to force all pipelines to run.
Any suggestions on how to get this working? How do others working with a mono repo solve these problems?
We are working with a single mono repo with the following structure.
bootstrap/
├── .github/workflows
│ ├── aws_core.yml
│ ├── client.yml
│ ├── data_api.yml
│ └── ingestion_api.yml
├── aws_core/
├── client/
├── data_api/
├── ingestion_api/
├── shared_lib/Each module has its own folder with a nice mixture between terraform, python and nodejs files. and it's own pipeline defined in .github
We got a few share libs with code used in multiple modules which triggers multiple pipelines. E.g. a chance in the shared_lib will trigger the pipelines for all our api's.
Pipeline for aws_core got the following triggers:
name: aws_core
on:
push:
paths:
- .github/workflows/aws_core.yml
- scripts/load_env.py
- aws_core/**Pipeline for the data_api
name: data_api
on:
push:
paths:
- .github/workflows/data_api.yml
- scripts/load_env.py
- scripts/requirements.txt
- data_api/**
- api_lambda_infra/**
- shared_lib/**Pipeline for shared_lib
name: shared_lib
on:
push:
paths:
- .github/workflows/shared_lib.yml
- scripts/requirements.txt
- shared_lib/**Each pipeline got it's own test job, the first problem is when opening up a PR to merge a branch into main if you select Auto-Merge it merges before all the pipelines has completed, so some tests might fail after the merge is complete breaking prod. 💥
The second problem is as you can see in the pipelines above they are only triggered on certain changes as we only want the relevant pipelines to run when working on a branch. It's common we modify code in multiple modules on the same branch, e.g. a change there require a new endpoint in the api and a change in the client. Committing this step by step will trigger one pipeline and in next commit another. Before merging into main it would be nice to force all pipelines to run.
Any suggestions on how to get this working? How do others working with a mono repo solve these problems?