Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/repo-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Repo sync

on:
workflow_dispatch:
schedule:
- cron: "30 8 * * 1"

permissions:
contents: write

jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
- run: gh repo sync $REPO
env:
REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.EC_AUTOMATION_KEY }}

31 changes: 31 additions & 0 deletions hack/conforma-patches.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

patches=(
https://github.com/zregvart/go-containerregistry.git
pr/credential-lookup
https://github.com/google/go-containerregistry/pull/1966

https://github.com/lcarva/go-containerregistry.git
ignore-malformed-secrets
https://github.com/google/go-containerregistry/pull/1834
)

for ((i = 0; i < ${#patches[@]}; i += 3)); do
url="${patches[i]}"
branch="${patches[i+1]}"
upstream_pr="${patches[i+2]}"

remote="$(tmp="${url%/*}"; echo "${tmp##*/}")"

git remote add --no-fetch "${remote}" "${url}" || true # ignore if it already exists
git fetch "${remote}" "${branch}"
git merge \
-m "Merge ${remote}/${branch}" \
-m "Used here: https://github.com/conforma/cli/blob/main/go.mod#L61" \
-m "See also: ${upstream_pr}" \
"${remote}/${branch}"
done