Skip to content

Commit 7f44428

Browse files
authored
Mozilla cacert update via Github Action (#34703)
* Github action to update the mozilla cacert bundle * Only run in core repo * No running on push. Alloow manual trigger * Update action to create a PR
1 parent 2a59f93 commit 7f44428

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Cron to update Mozilla CaCert files in the Joomla Core
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# * is a special character in YAML so you have to quote this string
7+
# Runs on the first day of every month at 03:00
8+
- cron: '0 3 1 * *'
9+
10+
jobs:
11+
build:
12+
if: (github.event_name == 'schedule' && github.repository == 'joomla/joomla-cms') || (github.event_name != 'schedule')
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Download the latest cacert file
20+
uses: wei/wget@v1
21+
with:
22+
args: -O libraries/src/Http/Transport/cacert.pem https://curl.se/ca/cacert.pem
23+
24+
- name: Copy the cacert file to the FOF repo
25+
run: cp "libraries/src/Http/Transport/cacert.pem" "libraries/fof/download/adapter/cacert.pem"
26+
27+
- name: Create Pull Request
28+
uses: peter-evans/create-pull-request@v3
29+
id: cpr
30+
with:
31+
branch: mozilla_ca_update
32+
33+
- name: Log resulting Pull Request
34+
run: |
35+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
36+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)