Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/mt-update-ssl-cert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: MT update SSL cert
on:
workflow_dispatch: # manual
pull_request: #DEBUG
schedule:
- cron: '0 10 * * 2' # Tuesdays @ 10am UTC # WEEKLY https://crontab.guru/#0_10_*_*_2
# gh workflow run mt-update-ssl-cert.yml --ref $(git rev-parse --abbrev-ref HEAD)
# gh run list --workflow=mt-update-ssl-cert.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
MT_BOT_USER_NAME: ${{ secrets.MT_BOT_USER_NAME }}
MT_BOT_USER_EMAIL: ${{ secrets.MT_BOT_USER_EMAIL }}
MT_BASE_BRANCH: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
jobs:
MT-UPDATE-SSL-CERT-JOB:
name: "MT Update SSL cert"
runs-on: ubuntu-latest
steps:
- name: MT checkout repo
uses: actions/checkout@v6

- name: MT files paths
run: |
echo "MOZILLA_ROOTS_URL=https://ccadb.my.salesforce-sites.com/mozilla/IncludedRootsPEMTxt?TrustBitsInclude=Websites" >> "$GITHUB_ENV"
echo "MOZILLA_ROOTS_PEM_FILE=src/main/res-cert/raw/mozilla_roots_pem" >> "$GITHUB_ENV"

- name: MT fetch latest SSL cert
run: |
curl \
--verbose \
--location \
--output "$MOZILLA_ROOTS_PEM_FILE" \
"$MOZILLA_ROOTS_URL";

- name: MT create pull request
id: create-pull-request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.MT_PAT }} # use our token to trigger workflow events
committer: ${{ secrets.MT_BOT_USER_NAME }} <${{ secrets.MT_BOT_USER_EMAIL }}>
author: ${{ secrets.MT_BOT_USER_NAME }} <${{ secrets.MT_BOT_USER_EMAIL }}>
commit-message: Update SSL cert
title: Update SSL cert
body: |
Update SSL cert
branch: update_ssl_cert_${{ env.MT_BASE_BRANCH }}
base: ${{ env.MT_BASE_BRANCH }}
add-paths: |
src/main/res-cert/raw/mozilla_roots_pem
2 changes: 1 addition & 1 deletion src/main/res-cert/raw/mozilla_roots_pem
Original file line number Diff line number Diff line change
Expand Up @@ -3548,4 +3548,4 @@ fZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7Ixjp
9kiABdcPUXmsEKvU7ANm5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wok
RqEIr9baRRmW1FMdW4R58MD3R++Lj8UGrp1MYp3/RgT408m2ECVAdf4WqslKYIYv
uu8wd+RU4riEmViAqhOLUTpPSPaLtrM=
-----END CERTIFICATE-----
-----END CERTIFICATE-----