Skip to content

Commit

Permalink
chore: run release pipeline on branch
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney committed Feb 13, 2024
1 parent ceafa1b commit 859dbb4
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 51 deletions.
1 change: 0 additions & 1 deletion .github/release-workflows.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ local build = lokiRelease.build;
branches=['k[0-9]*'],
), false, false
),
//TODO: need to set secrets on the repo and double check docker user/pw
'release.yml': std.manifestYamlDoc(
lokiRelease.releaseWorkflow(
branches=['release-[0-9].[0-9].x', 'k[0-9]*'],
Expand Down
101 changes: 51 additions & 50 deletions .github/workflows/patch-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
name: "parse image platform"
run: |
mkdir -p images
platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
echo "platform=${platform}" >> $GITHUB_OUTPUT
echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
Expand All @@ -205,14 +205,14 @@ jobs:
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token="${{ secrets.GH_TOKEN }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ `jq length release.json` -gt 1 ]]; then
if [[ `jq length release.json` -gt 1 ]]; then
echo 'release-please would create more than 1 PR, so cannot determine correct version'
echo "pr_created=false" >> $GITHUB_OUTPUT
exit 1
fi
if [[ `jq length release.json` -eq 0 ]]; then
if [[ `jq length release.json` -eq 0 ]]; then
echo "pr_created=false" >> $GITHUB_OUTPUT
else
version="$(npm run --silent get-version)"
Expand Down Expand Up @@ -276,7 +276,7 @@ jobs:
name: "parse image platform"
run: |
mkdir -p images
platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
echo "platform=${platform}" >> $GITHUB_OUTPUT
echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
Expand All @@ -301,14 +301,14 @@ jobs:
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token="${{ secrets.GH_TOKEN }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ `jq length release.json` -gt 1 ]]; then
if [[ `jq length release.json` -gt 1 ]]; then
echo 'release-please would create more than 1 PR, so cannot determine correct version'
echo "pr_created=false" >> $GITHUB_OUTPUT
exit 1
fi
if [[ `jq length release.json` -eq 0 ]]; then
if [[ `jq length release.json` -eq 0 ]]; then
echo "pr_created=false" >> $GITHUB_OUTPUT
else
version="$(npm run --silent get-version)"
Expand Down Expand Up @@ -401,7 +401,7 @@ jobs:
name: "parse image platform"
run: |
mkdir -p images
platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
echo "platform=${platform}" >> $GITHUB_OUTPUT
echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
Expand All @@ -426,14 +426,14 @@ jobs:
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token="${{ secrets.GH_TOKEN }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ `jq length release.json` -gt 1 ]]; then
if [[ `jq length release.json` -gt 1 ]]; then
echo 'release-please would create more than 1 PR, so cannot determine correct version'
echo "pr_created=false" >> $GITHUB_OUTPUT
exit 1
fi
if [[ `jq length release.json` -eq 0 ]]; then
if [[ `jq length release.json` -eq 0 ]]; then
echo "pr_created=false" >> $GITHUB_OUTPUT
else
version="$(npm run --silent get-version)"
Expand Down Expand Up @@ -499,7 +499,7 @@ jobs:
name: "parse image platform"
run: |
mkdir -p images
platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
echo "platform=${platform}" >> $GITHUB_OUTPUT
echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
Expand All @@ -524,14 +524,14 @@ jobs:
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token="${{ secrets.GH_TOKEN }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ `jq length release.json` -gt 1 ]]; then
if [[ `jq length release.json` -gt 1 ]]; then
echo 'release-please would create more than 1 PR, so cannot determine correct version'
echo "pr_created=false" >> $GITHUB_OUTPUT
exit 1
fi
if [[ `jq length release.json` -eq 0 ]]; then
if [[ `jq length release.json` -eq 0 ]]; then
echo "pr_created=false" >> $GITHUB_OUTPUT
else
version="$(npm run --silent get-version)"
Expand Down Expand Up @@ -595,7 +595,7 @@ jobs:
name: "parse image platform"
run: |
mkdir -p images
platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
echo "platform=${platform}" >> $GITHUB_OUTPUT
echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
Expand All @@ -620,14 +620,14 @@ jobs:
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token="${{ secrets.GH_TOKEN }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ `jq length release.json` -gt 1 ]]; then
if [[ `jq length release.json` -gt 1 ]]; then
echo 'release-please would create more than 1 PR, so cannot determine correct version'
echo "pr_created=false" >> $GITHUB_OUTPUT
exit 1
fi
if [[ `jq length release.json` -eq 0 ]]; then
if [[ `jq length release.json` -eq 0 ]]; then
echo "pr_created=false" >> $GITHUB_OUTPUT
else
version="$(npm run --silent get-version)"
Expand Down Expand Up @@ -693,7 +693,7 @@ jobs:
name: "parse image platform"
run: |
mkdir -p images
platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
echo "platform=${platform}" >> $GITHUB_OUTPUT
echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
Expand All @@ -718,14 +718,14 @@ jobs:
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token="${{ secrets.GH_TOKEN }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ `jq length release.json` -gt 1 ]]; then
if [[ `jq length release.json` -gt 1 ]]; then
echo 'release-please would create more than 1 PR, so cannot determine correct version'
echo "pr_created=false" >> $GITHUB_OUTPUT
exit 1
fi
if [[ `jq length release.json` -eq 0 ]]; then
if [[ `jq length release.json` -eq 0 ]]; then
echo "pr_created=false" >> $GITHUB_OUTPUT
else
version="$(npm run --silent get-version)"
Expand Down Expand Up @@ -791,7 +791,7 @@ jobs:
name: "parse image platform"
run: |
mkdir -p images
platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
echo "platform=${platform}" >> $GITHUB_OUTPUT
echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
Expand All @@ -816,14 +816,14 @@ jobs:
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token="${{ secrets.GH_TOKEN }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ `jq length release.json` -gt 1 ]]; then
if [[ `jq length release.json` -gt 1 ]]; then
echo 'release-please would create more than 1 PR, so cannot determine correct version'
echo "pr_created=false" >> $GITHUB_OUTPUT
exit 1
fi
if [[ `jq length release.json` -eq 0 ]]; then
if [[ `jq length release.json` -eq 0 ]]; then
echo "pr_created=false" >> $GITHUB_OUTPUT
else
version="$(npm run --silent get-version)"
Expand Down Expand Up @@ -889,7 +889,7 @@ jobs:
name: "parse image platform"
run: |
mkdir -p images
platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
echo "platform=${platform}" >> $GITHUB_OUTPUT
echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
Expand All @@ -914,14 +914,14 @@ jobs:
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token="${{ secrets.GH_TOKEN }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ `jq length release.json` -gt 1 ]]; then
if [[ `jq length release.json` -gt 1 ]]; then
echo 'release-please would create more than 1 PR, so cannot determine correct version'
echo "pr_created=false" >> $GITHUB_OUTPUT
exit 1
fi
if [[ `jq length release.json` -eq 0 ]]; then
if [[ `jq length release.json` -eq 0 ]]; then
echo "pr_created=false" >> $GITHUB_OUTPUT
else
version="$(npm run --silent get-version)"
Expand Down Expand Up @@ -985,7 +985,7 @@ jobs:
name: "parse image platform"
run: |
mkdir -p images
platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
echo "platform=${platform}" >> $GITHUB_OUTPUT
echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
Expand All @@ -1010,14 +1010,14 @@ jobs:
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token="${{ secrets.GH_TOKEN }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ `jq length release.json` -gt 1 ]]; then
if [[ `jq length release.json` -gt 1 ]]; then
echo 'release-please would create more than 1 PR, so cannot determine correct version'
echo "pr_created=false" >> $GITHUB_OUTPUT
exit 1
fi
if [[ `jq length release.json` -eq 0 ]]; then
if [[ `jq length release.json` -eq 0 ]]; then
echo "pr_created=false" >> $GITHUB_OUTPUT
else
version="$(npm run --silent get-version)"
Expand Down Expand Up @@ -1083,7 +1083,7 @@ jobs:
name: "parse image platform"
run: |
mkdir -p images
platform="$(echo "${{ matrix.platform}}" | sed "s/\(.*\)\/\(.*\)/\1-\2/")"
echo "platform=${platform}" >> $GITHUB_OUTPUT
echo "platform_short=$(echo ${{ matrix.platform }} | cut -d / -f 2)" >> $GITHUB_OUTPUT
Expand All @@ -1108,14 +1108,14 @@ jobs:
--target-branch "${{ steps.extract_branch.outputs.branch }}" \
--token="${{ secrets.GH_TOKEN }}" \
--versioning-strategy "${{ env.VERSIONING_STRATEGY }}"
if [[ `jq length release.json` -gt 1 ]]; then
if [[ `jq length release.json` -gt 1 ]]; then
echo 'release-please would create more than 1 PR, so cannot determine correct version'
echo "pr_created=false" >> $GITHUB_OUTPUT
exit 1
fi
if [[ `jq length release.json` -eq 0 ]]; then
if [[ `jq length release.json` -eq 0 ]]; then
echo "pr_created=false" >> $GITHUB_OUTPUT
else
version="$(npm run --silent get-version)"
Expand Down Expand Up @@ -1173,6 +1173,7 @@ name: "create release PR"
push:
branches:
- "release-[0-9].[0-9].x"
- "fix-action-names-in-main"
permissions:
contents: "write"
pull-requests: "write"

0 comments on commit 859dbb4

Please sign in to comment.