Code Monkey home page Code Monkey logo

actions's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

actions's Issues

Add ability to specify v1.7.x style for knative version.

Sometimes it's desireable to not have to specify the exact version of the, say knative version. Some reasons are:

  • The components don't all have that specific version
  • you really don't care which minor version it is

In #153 I added a latest that will pull the latest version for each, but again, it might be nice to go back to an older version like v1.6.x.

Wolfi-dev OS actions - resource not accessible warning

2024-04-10T11:55:40.7937799Z ##[group]Run thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6
2024-04-10T11:55:40.7938384Z with:
2024-04-10T11:55:40.7938595Z   filePath: diff.log
2024-04-10T11:55:40.7939344Z   GITHUB_TOKEN: ***
2024-04-10T11:55:40.7939599Z   mode: upsert
2024-04-10T11:55:40.7939838Z   create_if_not_exists: true
2024-04-10T11:55:40.7940119Z ##[endgroup]
2024-04-10T11:55:41.0317790Z ##[error]Resource not accessible by integration
2024-04-10T11:55:41.0405868Z ##[group]Run actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
2024-04-10T11:55:41.0406471Z with:
2024-04-10T11:55:41.0406723Z   path: ./packages/x86_64
./packages.log

As mentioned in annotations at https://github.com/wolfi-dev/os/actions/runs/8630712801

Move TODO-s to issues

  • boilerplate/action.yaml: # TODO(mattmoor): Cut a release of boilerplate-check we can use instead.
  • setup-kind/action.yaml: required: true # TODO(mattmoor): Make this optional
  • setup-melange/action.yaml: # TODO: the bubblewrap package available from "apt install"

digesta-bot idea: SBOM diff

This downloads the SBOM attestation and massages it into a simple list of package@versions for an image that has them.

function packages() {
  cosign download attestation \
    $(crane digest --full-ref --platform=${2:-linux/amd64} $1) \
    --predicate-type="https://spdx.dev/Document" | \
      jq -r '.payload' | base64 -d | \
      jq -r '.predicate.packages[] | ("\(.name) \(.versionInfo)")' | \
      grep -v sha256: | sort | uniq
}

example:

$ packages cgr.dev/chainguard/busybox:latest-glibc
busybox 1.36.1-r0
ca-certificates-bundle 20230506-r0
glibc 2.37-r6
glibc-locale-posix 2.37-r7
ld-linux 2.37-r7
wolfi-baselayout 20230201-r3

It could be cool for digesta-bot to include any package diffs in the description of the PR it opens with changes.

$ old=cgr.dev/chainguard/busybox@sha256:dda91f4fc322187003a093a60a7322604462cbf314d8c0ebfc3d4d075c8d7efe
$ new=cgr.dev/chainguard/busybox:latest-glibc
$ diff <(packages $old) <(packages $new)
1c1
< busybox 1.36.0-r5
---
> busybox 1.36.1-r0
3d2
< github.com/chainguard-images/images c8a42f1fed31ee9f5e5eb91e553817ca285c589b
5,7c4,6
< glibc-locale-posix 2.37-r6
< ld-linux 2.37-r6
< wolfi-baselayout 20230201-r0
---
> glibc-locale-posix 2.37-r7
> ld-linux 2.37-r7
> wolfi-baselayout 20230201-r3

Or even if not diffing, we could list the package versions of the new image(s), which can be useful.

GitHub Actions should be referenced by SHA not tag

Just like how container images should be referenced by digest, GitHub actions should be referenced by SHA and not tag. Dependabot can handle this pattern including keeping the tag used next to the SHA as a comment.

jobs:
  test:
    steps:
      - name: Checkout
        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

digesta-bot: Support Helm Chart (separate image and tag fields)

Lots of helm charts have image: and tag: on separate lines. For example from SPIRE helm chart:

    registry: cgr.dev
    # -- The repository within the registry
    repository: chainguard/bash
    # -- Overrides the image tag
    tag: latest@....

Would be great if digesta bot handled this layout.

Idea: apko-build inline configs

Had an idea, not sure if it's a good one.

apko-build takes a path to a config file, but it could also take the actual contents of the config file:

- uses: chainguard-dev/actions/apko-build@main
  with:
    config: |
      contents:
        repositories:
          - https://dl-cdn.alpinelinux.org/alpine/edge/main
        packages:
          - alpine-base
      cmd: /bin/sh -l
      archs:
        - amd64

    tag: ghcr.io/chainguard-dev/apko-example:latest

Nested YAML strings are kinda ๐Ÿคฎ, it won't nicely check that the inner YAML is valid until apko tries to run it. But it could be nice if you have a lot of configs in your repo that are only invoked by the GitHub action workflow.

Maybe config-contents vs config, and fail if both are specified. If neither are specified, still default to config: .apko.yaml.

WDYT? @kaniini

Improve release asset download

Currently it goes like

wget --progress=dot:giga \
    https://github.com/spdx/tools-java/releases/download/v${{ inputs.spdx-tools-version }}/tools-java-${{ inputs.spdx-tools-version }}.zip

GHA images include GitHub CLI.
So we can improve the process.

mkdir -p "${{ runner.temp }}/spdx"
RELEASE_ASSET_URL="$(
    gh api /repos/spdx/tools-java/releases/${{ inputs.spdx-tools-release-id }} \
        --jq '."assets"[] | select(."name" | test("^tools-java-.+\\.zip$")) | ."browser_download_url"'
)"
wget --secure-protocol=TLSv1_3 --max-redirect=1 --retry-on-host-error --retry-connrefused --tries=3 \
    --no-verbose --output-document="${{ runner.temp }}/spdx/tools-java.zip" "${RELEASE_ASSET_URL}"

source

Here is how to list releases.

gh api /repos/spdx/tools-java/releases --jq '.[] | ."name" + ":" + (."id"|tostring)'

melange lint action has thousands of tar errors

https://github.com/chainguard-dev/melange/actions/runs/8526927513

has many errors, and pages of error messages..... but lint works, and there are non red-herring issues identified in the end of the run.

I don't know if lint pipeline can be improved to be a "github checker" which does inline code comments on things it identifies.

And separately I don't understand the tar errors, possibly to do with restoring precached runs? which fails and are ignored? maybe turning off attempts to restore cache will make the build faster and have less errors.

Name the logs file with test context?

We upload logs from e2e tests. But we also run matrix jobs. If we fail more than one e2e test, we get a single logs.tar.gz file. and ... I have no idea which run it is tied to. I assume it is the last one. Can we name the logs artifact with some of the test name?

Allow creating single-node kind cluster

I'm proposing updating the setup-kind action to allow creating single node clusters (i.e. with no workers, only a single control-plane node).

Currently, the action requires at least one worker node, which means it isn't possible to create a single node kind cluster.

And, counter-intuitively, if a user specifies kind-worker-count: 0, they'll actually end up with two workers, as the loop at

for node in {1..${{ inputs.kind-worker-count }}}; do
will iterate from 1 to 0, e.g.

$ for x in {1..0}; do echo "x"; done
x
x

So that should probably be fixed, even if you still want to require at least one worker node.

How to use the apko-publish action with an APK image built in a previous step by the melange action?

I am building a APK package, that is not (yet) included in Wolfi, in a Github Action. I am using both the setup-melange and melange-build-pkg actions.

After the package build, I would like to use that package in the apko-publish action to create an image using the local repository created by the previous step.

I have not found documentation on how to do that, unfortunately.

I got it working, so if someone wants to do something similar:
https://github.com/kastl-ars/wolfi-apkrane

TL;DR: It would be really great to have a README with each action, describing how to use the action. Especially as melange-build-package is running "on the host" aka the Github Runner (and therefore needs the setup-melange action) while e.g. apko-publish runs inside a container...

metallb setup fails in Kind action

See here. This probably started failing on ubuntu-latest (there is a runner image update happening) due to some docker upgrade?

Error from server (parsing address pool config: invalid CIDR "fc00:f853:ccd:e793::/64.255.1-fc00:f853:ccd:e793::/64.255.250" in pool "config": invalid IP range "fc00:f853:ccd:e793::/64.255.1-fc00:f853:ccd:e793::/64.255.250": invalid start IP "fc00:f853:ccd:e793::/64.255.1"): error when creating "./metallb-crds.yaml": admission webhook "ipaddresspoolvalidationwebhook.metallb.io" denied the request: parsing address pool config: invalid CIDR "fc00:f853:ccd:e793::/64.255.1-fc00:f853:ccd:e793::/64.255.250" in pool "config": invalid IP range "fc00:f853:ccd:e793::/64.255.1-fc00:f853:ccd:e793::/64.255.250": invalid start IP "fc00:f853:ccd:e793::/64.255.1"

Getting the net config is not valid anymore as it needs to use the second index.
The following should do the trick (tested locally), not sure about compatibility across envs:

"$(docker network inspect kind -f '{{.IPAM.Config}}' |  grep -Po '(\d+\.){3}\d+' | head -n 1 | cut -d '.' -f1,2)"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.