Created
November 25, 2021 06:57
-
-
Save exoego/bbb281cbc55e07b865eb44c218675f66 to your computer and use it in GitHub Desktop.
GitHub Actions to update Rust aws-sdk crates
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
name: Update AWS SDK crates daily | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: oprypin/find-latest-tag@v1 | |
with: | |
repository: awslabs/aws-sdk-rust | |
releases-only: true | |
id: RELEASE_TAG | |
- name: Strip v prefix | |
uses: frabert/[email protected] | |
with: | |
string: '${{ steps.RELEASE_TAG.outputs.tag }}' | |
pattern: 'v(.+)' | |
replace-with: '$1' | |
id: CRATE_TAG | |
- name: Update Cargo.toml | |
uses: jacobtomlinson/gha-find-replace@v2 | |
with: | |
# Requires "# AWS_SDK_RUST" as marker comment to identity aws-sdk crates | |
find: '".+" # AWS_SDK_RUST' | |
replace: '"${{ steps.CRATE_TAG.outputs.replaced }}" # AWS_SDK_RUST' | |
include: "**/Cargo.toml" | |
regex: true | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: default | |
toolchain: stable | |
- name: Update Cargo.lock | |
run: cargo update | |
- name: Creates a PR | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
base: "main" | |
commit-message: "Update aws-sdk to ${{ steps.RELEASE_TAG.outputs.tag }}" | |
title: "Update aws-sdk to ${{ steps.RELEASE_TAG.outputs.tag }}" | |
body: Release notes: https://github.com/awslabs/aws-sdk-rust/releases/tag/${{ steps.AWS_SDK_RUST.outputs.tag }} | |
branch: "aws-sdk/${{ steps.RELEASE_TAG.outputs.tag }}" | |
delete-branch: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍