File tree 1 file changed +41
-0
lines changed 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1
1
name : rustc-pull
2
2
3
3
on :
4
+ pull_request :
4
5
workflow_dispatch :
5
6
schedule :
6
7
# Run at 04:00 UTC every Monday
10
11
pull :
11
12
if : github.repository == 'rust-lang/rustc-dev-guide'
12
13
runs-on : ubuntu-latest
14
+ outputs :
15
+ message : ${{ steps.update-pr.outputs.message }}
13
16
permissions :
14
17
contents : write
15
18
pull-requests : write
40
43
git switch -c $BRANCH
41
44
git push -u origin $BRANCH --force
42
45
- name : Create pull request
46
+ id : update-pr
43
47
run : |
44
48
# Check if an open pull request for an rustc pull update already exists
45
49
# If it does, the previous push has just updated it
53
57
fi
54
58
env :
55
59
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60
+ base :
61
+ runs-on : ubuntu-latest
62
+ outputs :
63
+ message : ${{ steps.update-pr.outputs.message }}
64
+ steps :
65
+ - name : Step 1
66
+ run : exit 1
67
+ - name : Update PR
68
+ id : update-pr
69
+ run : echo "message=M1" >> "$GITHUB_OUTPUT"
70
+ send-zulip-message :
71
+ needs : [base]
72
+ if : ${{ !cancelled() }}
73
+ runs-on : ubuntu-latest
74
+ steps :
75
+ - name : Compute message
76
+ id : message
77
+ run : |
78
+ if [ "${{ needs.base.result }}" == "failure" ];
79
+ then
80
+ MESSAGE="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
81
+ echo "message=Rustc pull sync has failed. Check out the [workflow URL]($MESSAGE)." >> $GITHUB_OUTPUT;
82
+ else
83
+ echo "message=FOO" >> $GITHUB_OUTPUT;
84
+ fi
85
+ - name : Print message
86
+ run : echo "${{ steps.message.outputs.message }}"
87
+ # - name: Send a Zulip message about updated PR
88
+ # uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5
89
+ # with:
90
+ # api-key: ${{ secrets.ZULIP_API_TOKEN }}
91
+
92
+ # organization-url: "https://rust-lang.zulipchat.com"
93
+ # to: 196385
94
+ # type: "stream"
95
+ # topic: "Subtree sync automation"
96
+ # content: ${{ steps.message.outputs.message }}
You can’t perform that action at this time.
0 commit comments