forked from open-component-model/ocm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into adjust_quote_style_for_yaml_in_localization_…
…as_needed
- Loading branch information
Showing
261 changed files
with
4,931 additions
and
1,729 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,62 @@ | ||
name: "Flake vendorHash Updater" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'go.mod' | ||
- 'go.sum' | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
updateVendorHash: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
- name: Generate token | ||
id: generate_token | ||
uses: tibdex/github-app-token@v2 | ||
with: | ||
app_id: ${{ secrets.OCMBOT_APP_ID }} | ||
private_key: ${{ secrets.OCMBOT_PRIV_KEY }} | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ steps.generate_token.outputs.token }} | ||
- name: Setup git config | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<41898282+github-actions[bot]@users.noreply.github.com>" | ||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
- name: Update ocm vendor hash | ||
run: nix run .#nixpkgs.nix-update -- --flake --version=skip ocm | ||
- name: Check diff | ||
id: check-diff | ||
run: | | ||
diff=$(git diff) | ||
if [[ -z "$diff" ]]; then | ||
echo "Everything is tidy." | ||
exit 0 | ||
fi | ||
cat << EOF >> "${GITHUB_STEP_SUMMARY}" | ||
\`\`\`diff | ||
${diff} | ||
\`\`\` | ||
EOF | ||
echo "push='true'" >> $GITHUB_ENV | ||
- name: Push changes | ||
if: github.event.pull_request.head.repo.fork == false && env.push == 'true' | ||
run: | | ||
diff=$(git diff) | ||
if [[ ! -z "$diff" ]]; then | ||
git config --global user.name "ocm-vendorhash" | ||
git config --global user.email "[email protected]" | ||
git commit -am "flake: update ocm vendorHash" | ||
git push | ||
fi |
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 |
---|---|---|
|
@@ -142,7 +142,7 @@ jobs: | |
go-version-file: '${{ github.workspace }}/go.mod' | ||
|
||
- name: Setup Syft | ||
uses: anchore/sbom-action/download-syft@7ccf588e3cf3cc2611714c2eeae48550fbc17552 # v0.15.11 | ||
uses: anchore/sbom-action/download-syft@e8d2a6937ecead383dfe75190d104edd1f9c5751 # v0.16.0 | ||
|
||
- name: Setup Cosign | ||
uses: sigstore/[email protected] | ||
|
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,19 @@ | ||
package common | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/open-component-model/ocm/pkg/out" | ||
) | ||
|
||
func Outf(ctx out.Context, dryRun bool, msg string, args ...any) (int, error) { | ||
if dryRun { | ||
return -1, nil | ||
} | ||
|
||
if len(args) == 0 { | ||
return fmt.Fprint(ctx.StdOut(), msg) | ||
} | ||
|
||
return fmt.Fprintf(ctx.StdOut(), msg, args...) | ||
} |
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
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
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
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
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
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.