Workflow file for this run
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
name: "Update the google apis" | ||
on: push # For testing, remove when you make the PR | ||
# on: | ||
# # Create the PR once a week at 12:00 on Monday. | ||
# schedule: | ||
# - cron: '0 12 * * MON' | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
id-token: 'write' | ||
env: | ||
REPO: googleapis/googleapis | ||
BRANCH: master | ||
jobs: | ||
create-update-google-apis-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Get current date | ||
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
- name: 'Authenticate to GCP' | ||
uses: 'google-github-actions/auth@v1' | ||
with: | ||
create_credentials_file: true | ||
workload_identity_provider: '${{ secrets.WIF_PROVIDER }}' | ||
service_account: '${{ secrets.SA_EMAIL }}' | ||
- name: 'Set up Cloud SDK' | ||
uses: google-github-actions/setup-gcloud@v1 | ||
with: | ||
version: '>= 390.0.0' | ||
- name: Get SHA for google apis | ||
run: | | ||
echo "COMMIT=$(curl --retry 5 -fsSL -H 'Accept: application/vnd.github.VERSION.sha' 'https://api.github.com/repos/${{ env.REPO }}/commits/${{ env.BRANCH}}')" >> $GITHUB_ENV | ||
- name: Make a temp directory | ||
run: | | ||
echo "DOWNLOADS=$(mktemp -d)" >> $GITHUB_ENV | ||
- name: Get SHA for google apis | ||
run: | | ||
curl -fsSL "https://github.com/${{ env.REPO }}/archive/${{ env.COMMIT }}.tar.gz" -o "${{ env.DOWNLOADS }}" | ||
gsutil -q cp "${{ env.DOWNLOADS }}" "gs://cloud-cpp-community-archive/com_google_googleapis/${{ env.COMMIT }}.tar.gz" | ||
echo 'SHA256=$(sha256sum "${{ env.DOWNLOADS }}" | sed "s/ .*//")' >> $GITHUB_ENV | ||
- name: Run the `renovate.sh` script | ||
run: TERM=xterm ./external/googleapis/renovate.sh | ||
env: | ||
SHA256: ${{ vars.SHA256 }} | ||
- name: Verify everything compiles with Bazel | ||
run: bazel build //google/cloud/... | ||
- name: Verify everything compiles with CMake | ||
run: ci/cloudbuild/build.sh -t cmake-install-pr | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: 'chore(googleapis-sha): update the sha circa ${{ env.DATE }}' | ||
title: 'chore(googleapis-sha): update the sha circa ${{ env.DATE }}' | ||
body: > | ||
This PR is auto-generated by | ||
[updated-googleapis-sha](https://github.com/googleapis/google-cloud-cpp/.github/workflows/update-googleapis-sha). | ||
labels: dependencies |