-
Notifications
You must be signed in to change notification settings - Fork 429
docs(homepage): auto-update Layer ARN on every release #1610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rubenfonseca
merged 12 commits into
aws-powertools:v2
from
rubenfonseca:feat/publish-layer
Oct 18, 2022
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1af2af4
fix(docs): added v2 layer and SAR
rubenfonseca 933bf0d
feat: automate layer version publishing when deploying
rubenfonseca a69200a
fix: increase the width of the documentation main column
rubenfonseca c5efc7c
fix(docs): remove old SAR section
rubenfonseca 45cf081
fix(docs): update references to SAR and v2 Layer
rubenfonseca c727fb8
chore: rename workflow
rubenfonseca 27a682d
fix: add docs to update layer arn script
rubenfonseca f925a76
fix: more docs
rubenfonseca b0f4806
fix: add the correct file to git
rubenfonseca caf752e
chore: rename job
rubenfonseca 818fdae
fix: apply suggestions from code review
rubenfonseca f7a6727
fix: typo
rubenfonseca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,60 @@ | ||
name: Publish V2 Layer ARN | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
latest_published_version: | ||
description: "Latest PyPi published version to rebuild latest docs for, e.g. v2.0.0" | ||
type: string | ||
required: true | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
BRANCH: v2 | ||
|
||
jobs: | ||
publish_v2_layer_arn: | ||
# Force Github action to run only a single job at a time (based on the group name) | ||
# This is to prevent race-condition and inconsistencies with changelog push | ||
concurrency: | ||
group: changelog-build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository # reusable workflows start clean, so we need to checkout again | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Git client setup and refresh tip | ||
run: | | ||
git config user.name "Release bot" | ||
git config user.email "aws-devax-open-source@amazon.com" | ||
git config pull.rebase true | ||
git config remote.origin.url >&- || git remote add origin https://github.com/"${origin}" # Git Detached mode (release notes) doesn't have origin | ||
git pull origin "${BRANCH}" | ||
- name: Download CDK layer artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: cdk-layer-stack | ||
path: cdk-layer-stack | ||
- name: Replace layer versions in documentation | ||
run: ./layer/scripts/update_layer_arn.sh cdk-layer-stack | ||
- name: Update documentation in trunk | ||
run: | | ||
HAS_CHANGE=$(git status --porcelain) | ||
test -z "${HAS_CHANGE}" && echo "Nothing to update" && exit 0 | ||
git add CHANGELOG.md | ||
rubenfonseca marked this conversation as resolved.
Show resolved
Hide resolved
|
||
git commit -m "chore: update v2 layer ARN on documentation" | ||
git pull origin "${BRANCH}" # prevents concurrent branch update failing push | ||
git push origin HEAD:refs/heads/"${BRANCH}" | ||
|
||
release-docs: | ||
needs: publish_v2_layer_arn | ||
permissions: | ||
contents: write | ||
pages: write | ||
uses: ./.github/workflows/reusable_publish_docs.yml | ||
with: | ||
version: ${{ inputs.latest_published_version }} | ||
alias: alpha | ||
rubenfonseca marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.