forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,020 changed files
with
28,870 additions
and
17,380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
issuer: https://accounts.google.com | ||
|
||
# kleung: ebuild-py5wka7s7g5no2hg8tpoqi9@kleung-chainguard.iam.gserviceaccount.com | ||
# staging: TBD | ||
# prod: TBD | ||
# "([kleung]|[staging]|[prod])" | ||
subject_pattern: "(108286754379380263406)" | ||
|
||
# Just cloning repo. | ||
permissions: | ||
contents: read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
issuer: https://accounts.google.com | ||
|
||
# prod-images: [email protected] | ||
subject: "111142206721819985077" | ||
|
||
permissions: | ||
contents: write | ||
actions: read | ||
checks: read | ||
pull_requests: write |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
issuer: https://accounts.google.com | ||
|
||
# prod-images: [email protected] | ||
subject: "100391373612188354572" | ||
|
||
permissions: | ||
contents: read | ||
actions: read | ||
checks: read | ||
pull_requests: write |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
issuer: https://accounts.google.com | ||
|
||
# staging-images: not in use | ||
# prod-images: [email protected] | ||
subject: "106649619308723948792" | ||
|
||
permissions: | ||
contents: read | ||
metadata: read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
issuer: https://accounts.google.com | ||
|
||
# staging-images: not in use | ||
# prod-images: [email protected] | ||
subject: "113866670232979663129" | ||
|
||
permissions: | ||
contents: read | ||
pull_requests: write |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
issuer: https://accounts.google.com | ||
|
||
# have more than one service account | ||
# staging-images: not in use | ||
# prod-images: [email protected] (102019613950547524864) | ||
# prod-images: [email protected] (102992167601221151705) | ||
subject_pattern: "(102019613950547524864|102992167601221151705)" | ||
|
||
permissions: | ||
contents: read | ||
pull_requests: write # to add labels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
issuer: https://accounts.google.com | ||
|
||
# staging-images: not in use | ||
# prod-images: [email protected] | ||
subject: "103105401375465041216" | ||
|
||
permissions: | ||
contents: read | ||
actions: read | ||
checks: read | ||
pull_requests: read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
issuer: https://accounts.google.com | ||
|
||
# [email protected] | ||
subject: "113420690109142620056" | ||
|
||
permissions: | ||
contents: write | ||
pull_requests: write | ||
workflows: write | ||
issues: write |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# LOg FOrwarder GH Bot | ||
|
||
issuer: https://accounts.google.com | ||
|
||
|
||
# 107094302893801739313 - | ||
# 113526919988895235687 - chainops | ||
# 100039185168246011183 - enforce | ||
subject_pattern: "(107094302893801739313|113526919988895235687|100039185168246011183)" | ||
|
||
permissions: | ||
actions: read | ||
workflows: read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: automated-pr-approve | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '*/45 * * * *' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
review-pr: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'wolfi-dev/os' | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Check out repository code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- run: | | ||
./scripts/auto-approve-pr.sh ${{ github.repository }} | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
name: Bundle Build Wolfi Packages | ||
|
||
on: | ||
schedule: | ||
# Deploy at 7:23 AM (PST) every day. | ||
- cron: "23 15 * * *" | ||
workflow_dispatch: | ||
inputs: | ||
package_names: | ||
required: false | ||
type: string | ||
default: "" | ||
description: "comma separated list of package names to build. If empty, build all packages." | ||
|
||
# Only run one build at a time to prevent out of sync signatures. | ||
concurrency: 'bundle-runner-a' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Build packages | ||
if: github.repository == 'wolfi-dev/os' | ||
|
||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/wolfi-dev/sdk:latest@sha256:c4640fd2e678c3ffe171047e5d232e6d2ca9cf8fc5120ad8d71bef45bdfa92b3 | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 'Trust the github workspace' | ||
run: | | ||
# This is to avoid fatal errors about "dubious ownership" because we are | ||
# running inside of a container action with the workspace mounted in. | ||
git config --global --add safe.directory "$(pwd)" | ||
- name: Authenticate to Google Cloud | ||
uses: "google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa" # v2.1.3 | ||
with: | ||
workload_identity_provider: "projects/567187841907/locations/global/workloadIdentityPools/bundle-post-wolfi/providers/github-provider" | ||
service_account: "bundle-runner-post-wolfi@staging-images-183e.iam.gserviceaccount.com" | ||
- name: Setup G Cloud SDK | ||
uses: "google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200" # v2.0.11 | ||
with: | ||
install_components: 'gke-gcloud-auth-plugin' | ||
- name: Print gcloud info | ||
shell: bash | ||
run: "gcloud info" | ||
- name: Configure GCR auth | ||
shell: bash | ||
run: gcloud auth configure-docker | ||
- name: Configure AR auth | ||
shell: bash | ||
run: gcloud auth configure-docker us-central1-docker.pkg.dev | ||
|
||
- name: Install sudo for gke-auth | ||
shell: bash | ||
run: apk add cmd:sudo | ||
|
||
- name: Make parent dir for gke-auth | ||
shell: bash | ||
run: mkdir -p /usr/local/bin | ||
|
||
- name: Connect to cluster | ||
uses: "imjasonh/gke-auth@31f5c5f16489a15037d46b08903d983889c46ddf" # v0.2.0 | ||
with: | ||
cluster: "bundle-runner-a" | ||
location: "us-central1" | ||
project: "staging-images-183e" | ||
|
||
- name: kubectl test | ||
shell: bash | ||
run: | | ||
apk add kubectl | ||
kubectl get namespace kube-system | ||
- name: "Generate local signing key" | ||
run: | | ||
make local-melange.rsa | ||
- name: "bundle build" | ||
shell: bash | ||
env: | ||
BUNDLE_REPO: us-central1-docker.pkg.dev/staging-images-183e/bundles | ||
BUCKET: "wolfi-registry-destination/${{ github.run_id }}" | ||
run: | | ||
set -x | ||
set -v | ||
COMMON_FLAGS=$(cat <<-END | ||
--keyring-append ./local-melange.rsa.pub \ | ||
--keyring-append https://packages.wolfi.dev/os/wolfi-signing.rsa.pub | ||
--repository-append https://packages.wolfi.dev/os | ||
END | ||
) | ||
BUNDLE=$(wolfictl bundle \ | ||
--bundle-base ghcr.io/wolfi-dev/sdk:latest@sha256:c4640fd2e678c3ffe171047e5d232e6d2ca9cf8fc5120ad8d71bef45bdfa92b3 \ | ||
--bundle-repo "${BUNDLE_REPO}" \ | ||
${COMMON_FLAGS} \ | ||
--runner bubblewrap \ | ||
--pipeline-dir ./pipelines \ | ||
${{ github.event.inputs.package_names }} | ||
) | ||
wolfictl build \ | ||
--jobs 128 \ | ||
--bucket "${BUCKET}" \ | ||
--destination-bucket "${BUCKET}" \ | ||
${COMMON_FLAGS} \ | ||
--k8s-namespace 'post-wolfi' \ | ||
--service-account 'post-wolfi' \ | ||
--trace /tmp/trace.json \ | ||
--bundle "${BUNDLE}" | ||
- if: ${{ always() }} | ||
name: 'Upload trace to GitHub Artifacts' | ||
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 | ||
with: | ||
name: trace-build.json | ||
path: /tmp/trace.json | ||
if-no-files-found: warn | ||
|
||
postrun: | ||
name: Notify Slack | ||
runs-on: ubuntu-latest | ||
if: failure() && false # TODO(kleung): remove `&& false` when ready to slack | ||
needs: [build] | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- uses: rtCamp/action-slack-notify@4e5fb42d249be6a45a298f3c9543b111b02f7907 # v2.3.0 | ||
env: | ||
SLACK_ICON: http://github.com/chainguard-dev.png?size=48 | ||
SLACK_USERNAME: guardian | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
SLACK_CHANNEL: chainguard-images-alerts | ||
SLACK_MSG_AUTHOR: wolfi-bot | ||
SLACK_COLOR: "#8E1600" | ||
MSG_MINIMAL: "true" | ||
SLACK_TITLE: "[bundle build wolfi] failure: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
SLACK_MESSAGE: | | ||
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.