#github-actions - January 2024

10 messages

Discussions related to GitHub Actions

January 2024
johncblandii
johncblandiialmost 3 years ago(edited)
@Igor Rodionov is there a way to not build an image index from cloudposse/github-aciton-docker-build-push?

Lambdas can't use the image index and we don't see a way just to get the image uri itself after a build
rss
rssalmost 3 years ago(edited)
OliverS
OliverSalmost 3 years ago(edited)
Hey everyone, wondering how you guys vet third-party github actions? The github-verified badge on an action is nice but is not an indicator that the action was audited. And verified actions can use non verified actions. Does your team use a tool that does security checks on an action (and all called actions, recursively), like snyk would do for source code that uses libraries? Are there CVE's against actions? 🙂
Saichovsky
Saichovskyalmost 3 years ago
Hey 👋

I have a repo with a GitHub action which triggers on push to the master branch (when PRs get merged to master, I believe)

I would like to add a couple of jobs that will run if the PR that just got merged to master had certain labels. The push event does not have a labels attribute, but the pull_request event does.

I’m now wondering: is
on:
  push:
    branches:
      - master # commits to master I believe

equivalent to:
on:
  pull_request:
    branches:
      - master
    types: ["closed"] # I suspect that this would also be the same as the above commit to master. We auto-close PRs upon merging to master

If these two triggers are identical logically, then I can change the PR trigger from the former to the latter without breaking the existing jobs. I just want to be sure that it won’t break. If the two triggers are not logically similar, someone please explain to me how I can achieve what I am trying to without breaking the other older, existing jobs

Thanks in advance
rss
rssalmost 3 years ago(edited)
Saichovsky
Saichovskyalmost 3 years ago(edited)
Hey guys,

I have another tricky scenario re: github actions:

I have this job which is a terraform-apply job (let’s call it job1) and gives an output that looks like this:

{
 "A": "123",
 "B": "234",
 "C": "345"
}

I would like to have another job, say job2 that runs after job1 and consumes the output from job1 for use in a matrix. I want the matrix for job 2 to look like this:

job2:
  needs: ["job1"]
  strategy:
    matrix:
      env:
        [
          { environment: production, item: [ "A", "B", "C" ] }, # Note that A, B and C are the keys from job1's output JSON
          { environment: development, item: [ "A", "B", "C" ] }} }
        ]

I shall be needing job1's output as a complete JSON in job2 as I shall be using jq to retrieve the values, for each key in matrix.env.item

What’s the best way to go about this?
johncblandii
johncblandiialmost 3 years ago
We've noticed issues with https://github.com/cloudposse/github-action-pre-commit creating problems with branches where it updates the current branch with main, but the commits are included in a new commit which makes the PR look like it has all of the other changes as well.

Maybe this is an issue caused from squash committing or something else...not sure, but only formatting/committing changes from the current branch without updating it would be ideal.
rss
rssalmost 3 years ago(edited)
rss
rssalmost 3 years ago(edited)
GitHub Actions: macOS 14 (Sonoma) is now available
GitHub Actions: macOS 14 (Sonoma) is now available
The post GitHub Actions: macOS 14 (Sonoma) is now available appeared first on The GitHub Blog.