Skip to content

Commit 4e70776

Browse files
committed
Add workflow to process commit message metadata
1 parent 806b30d commit 4e70776

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2021 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
# Workflow name:
20+
name: process_metadata
21+
22+
# Workflow triggers:
23+
on:
24+
push:
25+
26+
# Workflow jobs:
27+
jobs:
28+
29+
# Define a job for processing commit message metadata...
30+
process:
31+
# Define a display name:
32+
name: "Process Metadata"
33+
34+
# Define the type of virtual host machine:
35+
runs-on: ubuntu-latest
36+
37+
# Define the sequence of job steps...
38+
steps:
39+
# Checkout the repository:
40+
- name: 'Checkout repository'
41+
uses: actions/checkout@v2
42+
with:
43+
# Specify whether to remove untracked files before checking out the repository:
44+
clean: false
45+
46+
# Limit clone depth to the most recent 100 commits:
47+
fetch-depth: 100
48+
49+
# Specify whether to download Git-LFS files:
50+
lfs: false
51+
timeout-minutes: 10
52+
53+
# Extract commit message metadata:
54+
- name: Extract metadata
55+
id: extract-metadata
56+
uses: stdlib-js/commit-metadata-action@v1
57+
58+
# Check the commit message metadata for directives to send tweets:
59+
- name: Check metadata for directives to send tweets
60+
uses: stdlib-js/metadata-tweet-action@v1
61+
with:
62+
metadata: ${{ steps.extract-metadata.outputs.metadata }}
63+
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
64+
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
65+
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
66+
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

0 commit comments

Comments
 (0)