mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.5 to 7.0.6.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](5e914681df...67ccf781d6)
---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
77 lines
4.1 KiB
YAML
77 lines
4.1 KiB
YAML
name: Bump x509-limbo and/or wycheproof
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# Run daily
|
|
- cron: "0 0 * * *"
|
|
|
|
jobs:
|
|
bump:
|
|
if: github.repository_owner == 'pyca'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
# Needed so we can push back to the repo
|
|
persist-credentials: true
|
|
- id: check-sha-x509-limbo
|
|
run: |
|
|
SHA=$(git ls-remote https://github.com/C2SP/x509-limbo refs/heads/main | cut -f1)
|
|
LAST_COMMIT=$(grep x509-limbo-ref .github/actions/fetch-vectors/action.yml | grep -oE '[a-f0-9]{40}')
|
|
if ! grep -q "$SHA" .github/actions/fetch-vectors/action.yml; then
|
|
echo "COMMIT_SHA=${SHA}" >> $GITHUB_OUTPUT
|
|
echo "COMMIT_MSG<<EOF" >> $GITHUB_OUTPUT
|
|
echo -e "## x509-limbo\n[Commit: ${SHA}](https://github.com/C2SP/x509-limbo/commit/${SHA})\n\n[Diff](https://github.com/C2SP/x509-limbo/compare/${LAST_COMMIT}...${SHA}) between the last commit hash merged to this repository and the new commit." >> $GITHUB_OUTPUT
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
fi
|
|
- name: Update x509-limbo
|
|
run: |
|
|
set -xe
|
|
CURRENT_DATE=$(date "+%b %d, %Y")
|
|
sed -E -i "s/Latest commit on the x509-limbo main branch.*/Latest commit on the x509-limbo main branch, as of ${CURRENT_DATE}./" .github/actions/fetch-vectors/action.yml
|
|
sed -E -i "s/ref: \"[0-9a-f]{40}\" # x509-limbo-ref/ref: \"${COMMIT_SHA}\" # x509-limbo-ref/" .github/actions/fetch-vectors/action.yml
|
|
git status
|
|
if: steps.check-sha-x509-limbo.outputs.COMMIT_SHA
|
|
env:
|
|
COMMIT_SHA: ${{ steps.check-sha-x509-limbo.outputs.COMMIT_SHA }}
|
|
- id: check-sha-wycheproof
|
|
run: |
|
|
SHA=$(git ls-remote https://github.com/C2SP/wycheproof refs/heads/master | cut -f1)
|
|
LAST_COMMIT=$(grep wycheproof-ref .github/actions/fetch-vectors/action.yml | grep -oE '[a-f0-9]{40}')
|
|
if ! grep -q "$SHA" .github/actions/fetch-vectors/action.yml; then
|
|
echo "COMMIT_SHA=${SHA}" >> $GITHUB_OUTPUT
|
|
echo "COMMIT_MSG<<EOF" >> $GITHUB_OUTPUT
|
|
echo -e "## wycheproof\n[Commit: ${SHA}](https://github.com/C2SP/wycheproof/commit/${SHA})\n\n[Diff](https://github.com/C2SP/wycheproof/compare/${LAST_COMMIT}...${SHA}) between the last commit hash merged to this repository and the new commit." >> $GITHUB_OUTPUT
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
fi
|
|
- name: Update wycheproof
|
|
run: |
|
|
set -xe
|
|
CURRENT_DATE=$(date "+%b %d, %Y")
|
|
sed -E -i "s/Latest commit on the wycheproof master branch.*/Latest commit on the wycheproof master branch, as of ${CURRENT_DATE}./" .github/actions/fetch-vectors/action.yml
|
|
sed -E -i "s/ref: \"[0-9a-f]{40}\" # wycheproof-ref/ref: \"${COMMIT_SHA}\" # wycheproof-ref/" .github/actions/fetch-vectors/action.yml
|
|
git status
|
|
if: steps.check-sha-wycheproof.outputs.COMMIT_SHA
|
|
env:
|
|
COMMIT_SHA: ${{ steps.check-sha-wycheproof.outputs.COMMIT_SHA }}
|
|
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
|
|
id: generate-token
|
|
with:
|
|
app_id: ${{ secrets.BORINGBOT_APP_ID }}
|
|
private_key: ${{ secrets.BORINGBOT_PRIVATE_KEY }}
|
|
if: steps.check-sha-x509-limbo.outputs.COMMIT_SHA || steps.check-sha-wycheproof.outputs.COMMIT_SHA
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
|
|
with:
|
|
branch: "bump-vectors"
|
|
commit-message: "Bump x509-limbo and/or wycheproof in CI"
|
|
title: "Bump x509-limbo and/or wycheproof in CI"
|
|
author: "pyca-boringbot[bot] <pyca-boringbot[bot]+106132319@users.noreply.github.com>"
|
|
body: |
|
|
${{ steps.check-sha-x509-limbo.outputs.COMMIT_MSG }}
|
|
${{ steps.check-sha-wycheproof.outputs.COMMIT_MSG }}
|
|
token: ${{ steps.generate-token.outputs.token }}
|
|
if: steps.check-sha-x509-limbo.outputs.COMMIT_SHA || steps.check-sha-wycheproof.outputs.COMMIT_SHA
|