-
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.
Merge pull request #6 from amp-buildpacks/feat/issue-3
- Loading branch information
Showing
8 changed files
with
163 additions
and
144 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,13 @@ | ||
github: | ||
username: ${{ github.actor }} | ||
token: ${{ secrets.AMP_BUILDPACKS_BOT_GITHUB_TOKEN }} | ||
|
||
package: | ||
repositories: ["ghcr.io/amp-buildpacks/cairo"] | ||
register: false | ||
registry_token: ${{ secrets.AMP_BUILDPACKS_BOT_GITHUB_TOKEN }} | ||
|
||
docker_credentials: | ||
- registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.AMP_BUILDPACKS_BOT_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,87 @@ | ||
name: Update Pipeline | ||
"on": | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .github/pipeline-descriptor.yml | ||
schedule: | ||
- cron: 0 5 * * 1-5 | ||
workflow_dispatch: {} | ||
jobs: | ||
update: | ||
name: Update Pipeline | ||
runs-on: | ||
- ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
- name: Install octo | ||
run: | | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
go install -ldflags="-s -w" github.com/paketo-buildpacks/pipeline-builder/cmd/octo@latest | ||
- uses: actions/checkout@v3 | ||
- name: Update Pipeline | ||
id: pipeline | ||
run: | | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
if [[ -f .github/pipeline-version ]]; then | ||
OLD_VERSION=$(cat .github/pipeline-version) | ||
else | ||
OLD_VERSION="0.0.0" | ||
fi | ||
rm .github/workflows/pb-*.yml || true | ||
octo --descriptor "${DESCRIPTOR}" | ||
PAYLOAD=$(gh api /repos/paketo-buildpacks/pipeline-builder/releases/latest) | ||
NEW_VERSION=$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.name') | ||
echo "${NEW_VERSION}" > .github/pipeline-version | ||
RELEASE_NOTES=$( | ||
gh api \ | ||
-F text="$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.body')" \ | ||
-F mode="gfm" \ | ||
-F context="paketo-buildpacks/pipeline-builder" \ | ||
-X POST /markdown | ||
) | ||
git add .github/ | ||
git checkout -- . | ||
echo "old-version=${OLD_VERSION}" >> "$GITHUB_OUTPUT" | ||
echo "new-version=${NEW_VERSION}" >> "$GITHUB_OUTPUT" | ||
DELIMITER=$(openssl rand -hex 16) # roughly the same entropy as uuid v4 used in https://github.com/actions/toolkit/blob/b36e70495fbee083eb20f600eafa9091d832577d/packages/core/src/file-command.ts#L28 | ||
printf "release-notes<<%s\n%s\n%s\n" "${DELIMITER}" "${RELEASE_NOTES}" "${DELIMITER}" >> "${GITHUB_OUTPUT}" # see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings | ||
env: | ||
DESCRIPTOR: .github/pipeline-descriptor.yml | ||
GITHUB_TOKEN: ${{ secrets.AMP_BUILDPACKS_BOT_GITHUB_TOKEN }} | ||
- uses: peter-evans/create-pull-request@v5 | ||
with: | ||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | ||
body: |- | ||
Bumps pipeline from `${{ steps.pipeline.outputs.old-version }}` to `${{ steps.pipeline.outputs.new-version }}`. | ||
<details> | ||
<summary>Release Notes</summary> | ||
${{ steps.pipeline.outputs.release-notes }} | ||
</details> | ||
branch: update/pipeline | ||
commit-message: |- | ||
Bump pipeline from ${{ steps.pipeline.outputs.old-version }} to ${{ steps.pipeline.outputs.new-version }} | ||
Bumps pipeline from ${{ steps.pipeline.outputs.old-version }} to ${{ steps.pipeline.outputs.new-version }}. | ||
delete-branch: true | ||
labels: semver:patch, type:task | ||
signoff: true | ||
title: Bump pipeline from ${{ steps.pipeline.outputs.old-version }} to ${{ steps.pipeline.outputs.new-version }} | ||
token: ${{ secrets.AMP_BUILDPACKS_BOT_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,18 @@ | ||
# Copyright (c) The Amphitheatre Authors. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
bin/ | ||
dependencies/ | ||
package/ | ||
scratch/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[dependencies]] | ||
repo = "amp-buildpacks/scarb" | ||
version = "0.2.0" | ||
|
||
[[dependencies]] | ||
repo = "amp-buildpacks/starknet" | ||
version = "0.1.0" |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,18 @@ | ||
|
||
[[dependencies]] | ||
uri = "docker://ghcr.io/amp-buildpacks/scarb:0.1.0" | ||
uri = "docker://ghcr.io/amp-buildpacks/scarb:0.2.0" | ||
|
||
[[dependencies]] | ||
uri = "docker://ghcr.io/amp-buildpacks/starknet:0.1.0" | ||
|
||
|
||
[[dependencies]] | ||
uri = "docker://gcr.io/paketo-buildpacks/procfile:5.6.8" | ||
|
||
[[targets]] | ||
arch = "amd64" | ||
os = "linux" | ||
|
||
[[targets]] | ||
arch = "arm64" | ||
os = "linux" |