@@ -2,15 +2,15 @@ name: Update WordPress i18n build files
2
2
3
3
on :
4
4
schedule :
5
- - cron : " 0 0 * * *" # Funciona todos os dias à meia-noite .
5
+ - cron : " 0 0 * * *" # Runs every day at midnight .
6
6
7
7
# Allows you to run this workflow manually from the Actions tab.
8
8
workflow_dispatch :
9
9
10
10
env :
11
11
OWNER : ${{ github.repository_owner }}
12
12
REPO : ${{ github.repository }}
13
- TOKEN : ${{ secrets.GITHUB_TOKEN }}
13
+ GH_TOKEN : " ${{ github.token }}"
14
14
15
15
permissions :
16
16
contents : write
52
52
if ! cmp -s downloads/readme.html en_US/readme.html || ! cmp -s downloads/wp-config-sample.php en_US/wp-config-sample.php; then
53
53
echo "The build files have been updated!"
54
54
echo "files_changed=true" >> $GITHUB_OUTPUT
55
+ else
56
+ echo "The build files remain unchanged."
57
+ echo "files_changed=false" >> $GITHUB_OUTPUT
55
58
fi
56
59
57
60
- name : Save workspace files to artifact
@@ -104,10 +107,11 @@ jobs:
104
107
105
108
steps :
106
109
110
+ - name : Checkout repository
111
+ uses : actions/checkout@v4
112
+
107
113
- name : Check if Pull Request exists
108
114
id : check_pr
109
- env :
110
- GH_TOKEN : " ${{ github.token }}"
111
115
run : |
112
116
PR_NUMBER="$(gh pr list --head "${OWNER}:english" --json "number" --jq '.[0]."number"')"
113
117
if [ -n "$PR_NUMBER" ]; then
@@ -123,7 +127,6 @@ jobs:
123
127
env :
124
128
TITLE : " Actualizar ficheiros originais em inglês"
125
129
BODY : " Actualização automática para submeter alterações do branch 'english' para o 'main'."
126
- GH_TOKEN : " ${{ github.token }}"
127
130
run : |
128
131
gh pr create --title "${TITLE}" --body "${BODY}" --head "english" --base "main"
129
132
0 commit comments