{"id":25887889,"url":"https://github.com/wolfi-dev/wolfi-act","last_synced_at":"2025-03-02T18:19:58.937Z","repository":{"id":181839724,"uuid":"594517553","full_name":"wolfi-dev/wolfi-act","owner":"wolfi-dev","description":"Dynamic GitHub Actions from Wolfi packages","archived":false,"fork":false,"pushed_at":"2024-05-13T00:43:37.000Z","size":122,"stargazers_count":38,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-13T01:37:13.206Z","etag":null,"topics":["wolfi"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wolfi-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-28T19:45:10.000Z","updated_at":"2024-05-13T01:37:14.756Z","dependencies_parsed_at":"2024-04-01T15:52:16.355Z","dependency_job_id":null,"html_url":"https://github.com/wolfi-dev/wolfi-act","commit_stats":null,"previous_names":["jdolitsky/wolfi-act","wolfi-dev/wolfi-act"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfi-dev%2Fwolfi-act","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfi-dev%2Fwolfi-act/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfi-dev%2Fwolfi-act/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfi-dev%2Fwolfi-act/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wolfi-dev","download_url":"https://codeload.github.com/wolfi-dev/wolfi-act/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241549211,"owners_count":19980493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wolfi"],"created_at":"2025-03-02T18:19:58.270Z","updated_at":"2025-03-02T18:19:58.924Z","avatar_url":"https://github.com/wolfi-dev.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# wolfi-act\n\n![](./wolfi-act.jpg)\n\nDynamic GitHub Actions from [Wolfi](https://wolfi.dev/) packages\n\nNever worry again about installing your favorite tools using upstream \"installer\"\nactions or whatever is available in GitHub via `apt-get`.\n\nThis action builds an ephermeral container image from the latest Wolfi packages\nand runs your command inside of it.\n\n## Usage\n\nPass in `packages` with a comma-separated list of packages available in\nWolfi, along with a `command` you wish to run.\n\n```yaml\n- uses: wolfi-dev/wolfi-act@main\n  with:\n    packages: jq,cosign\n    command: |\n      jq --version\n      cosign --version\n```\n\n### Example: run a grype and trivy scan on an image\n\nSource: [grype-trivy-scan-example.yaml](./examples/grype-trivy-scan-example.yaml)\n\n```yaml\n# .github/workflows/grype-trivy-scan-example.yaml\non:\n  push:\n    branches:\n      - main\n  workflow_dispatch: {}\njobs:\n  wolfi-act:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: wolfi-dev/wolfi-act@main\n        with:\n          packages: grype,trivy\n          command: |\n            set -x\n            grype cgr.dev/chainguard/nginx\n            trivy image cgr.dev/chainguard/nginx\n```\n\n### Example: build, push, sign, and tag an image\n\nSource: [oci-image-push-sign-tag-example.yaml](./examples/oci-image-push-sign-tag-example.yaml)\n\n```yaml\n# .github/workflows/oci-image-push-sign-tag-example.yaml\non:\n  push:\n    branches:\n      - main\n  workflow_dispatch: {}\njobs:\n  wolfi-act:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      packages: write\n      id-token: write # needed for GitHub  OIDC Token\n    steps:\n      - uses: actions/checkout@v3\n      - uses: wolfi-dev/wolfi-act@main\n        env:\n          OCI_HOST: ghcr.io\n          OCI_REPO: ${{ github.repository }}/wolfi-act-demo\n          OCI_USER: ${{ github.repository_owner }}\n          OCI_PASS: ${{ github.token }}\n          OCI_TAG: latest\n          APKO_ARCHS: x86_64,aarch64\n          APKO_KEYS: https://packages.wolfi.dev/os/wolfi-signing.rsa.pub\n          APKO_REPOS: https://packages.wolfi.dev/os\n          APKO_DEFAULT_CONF: https://raw.githubusercontent.com/chainguard-images/images/main/images/wolfi-base/configs/latest.apko.yaml\n        with:\n          packages: curl,apko,cosign,crane\n          command: |\n            set -x\n\n            # Make sure repo has an apko.yaml file, otherwise use default\n            if [[ ! -f apko.yaml ]]; then\n              echo \"Warning: no apko.yaml in repo, downloading from $APKO_DEFAULT_CONF\"\n              curl -sL -o apko.yaml $APKO_DEFAULT_CONF\n            fi\n\n            # Login to OCI registry\n            apko login $OCI_HOST -u $OCI_USER -p $OCI_PASS\n\n            # Publish image with apko and capture the index digest\n            digest=$(apko publish --arch $APKO_ARCHS \\\n                       -k $APKO_KEYS -r $APKO_REPOS \\\n                       apko.yaml $OCI_HOST/$OCI_REPO)\n\n            # Sign with cosign\n            cosign sign --yes $digest\n\n            # Lastly, tag the image with crane\n            crane copy $digest $OCI_HOST/$OCI_REPO:$OCI_TAG\n```\n\n\n### Example: run multiple versions of kubectl using build matrix\n\nSource: [multiple-versions-of-kubectl-example.yaml](./examples/multiple-versions-of-kubectl-example.yaml)\n\n```yaml\n# .github/workflows/multiple-versions-of-kubectl-example.yaml\non:\n  push:\n    branches:\n      - main\n  workflow_dispatch: {}\njobs:\n  wolfi-act:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        wolfi_pkg_name_kubectl:\n          - kubectl-1.24\n          - kubectl-1.25\n          - kubectl-1.26\n          - kubectl # note: this is 1.27 or latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: wolfi-dev/wolfi-act@main\n        with:\n          packages: ${{ matrix.wolfi_pkg_name_kubectl }}\n          command: |\n            set -x\n\n            # Make a symlink when \"kubectl\" is not the name of the binary in the package\n            if [[ \"${{ matrix.wolfi_pkg_name_kubectl }}\" != \"kubectl\" ]]; then\n              ln -sf /usr/bin/${{ matrix.wolfi_pkg_name_kubectl }} /usr/bin/kubectl\n            fi\n\n            kubectl version --client\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfi-dev%2Fwolfi-act","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolfi-dev%2Fwolfi-act","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfi-dev%2Fwolfi-act/lists"}