-
Notifications
You must be signed in to change notification settings - Fork 3k
67 lines (64 loc) · 2.54 KB
/
firefox-ios-update_credential_provider_script.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Update credential provider script
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch: # adding the workflow_dispatch so it can be triggered manually
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Get the current github action name
run: |
github_action_name="Update credential provider script"
echo "github_action_name=$github_action_name" >> $GITHUB_ENV
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./test-fixtures/requirements.txt
- name: Modify credential provider script
run: |
python firefox-ios/Client/Assets/CC_Script/CC_Python_Update.py
- name: Commit and push credential provider changed
run: |-
git diff
git diff --quiet || (git add .)
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: Refactor - auto update credential provider script
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
committer: GitHub <[email protected]>
title: Refactor - auto update credential provider script
branch: update-cred-provider-script
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set job log URL
if: always()
run: echo "JOB_LOG_URL=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV
- name: Send Slack to notifiy if github action fails
if: '!cancelled()'
id: slack
uses: slackapi/[email protected]
env:
JOB_STATUS: ${{ job.status == 'success' && ':white_check_mark:' || job.status == 'failure' && ':x:' }}
JOB_STATUS_COLOR: ${{ job.status == 'success' && '#36a64f' || job.status == 'failure' && '#FF0000' }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
payload-file-path: "./test-fixtures/ci/slack-notification-payload-autofill.json"
call-firefox-ios-autofill-playwrite-tests:
uses: ./.github/workflows/firefox-ios-autofill-playwrite-tests.yml
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.WEBHOOK_SLACK_TOKEN }}