Refresh Feed #2772
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Refresh Feed | |
| on: | |
| push: | |
| schedule: | |
| - cron: 0 */3 * * * | |
| permissions: | |
| contents: write | |
| jobs: | |
| refresh-feed: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout ποΈ | |
| uses: actions/checkout@v2 | |
| with: | |
| persist-credentials: false | |
| - name: Fetch API Data π¦ | |
| uses: JamesIves/fetch-api-data-action@v2 | |
| with: | |
| # endpoint: https://example.com | |
| endpoint: "https://uscms-openproject.k8s.accre.vanderbilt.edu/api/v3/work_packages?filters=[{\"project\": {\"operator\": \"=\", \"values\": [\"4\",\"5\",\"35\",\"6\",\"8\"]}}]&pageSize=1000" | |
| # configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer ${{ secrets.API_TOKEN }}"} }' | |
| configuration: '{ "method": "GET", "headers": {"Authorization": "Basic ${{ secrets.API_TOKEN }}"} }' | |
| set-output: false | |
| - name: Fetch API Data (S&C)π¦ | |
| uses: JamesIves/fetch-api-data-action@v2 | |
| with: | |
| # endpoint: https://example.com | |
| endpoint: "https://uscms-openproject.k8s.accre.vanderbilt.edu/api/v3/work_packages?filters=[{\"project\": {\"operator\": \"=\", \"values\": [\"4\"]}}]&pageSize=1000" | |
| # configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer ${{ secrets.API_TOKEN }}"} }' | |
| configuration: '{ "method": "GET", "headers": {"Authorization": "Basic ${{ secrets.API_TOKEN }}"} }' | |
| set-output: false | |
| save-name: s-c | |
| - name: Fetch API Data (WBS1)π¦ | |
| uses: JamesIves/fetch-api-data-action@v2 | |
| with: | |
| # endpoint: https://example.com | |
| endpoint: "https://uscms-openproject.k8s.accre.vanderbilt.edu/api/v3/work_packages?filters=[{\"project\": {\"operator\": \"=\", \"values\": [\"5\"]}}]&pageSize=1000" | |
| # configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer ${{ secrets.API_TOKEN }}"} }' | |
| configuration: '{ "method": "GET", "headers": {"Authorization": "Basic ${{ secrets.API_TOKEN }}"} }' | |
| set-output: false | |
| save-name: wbs1 | |
| - name: Fetch API Data (WBS2)π¦ | |
| uses: JamesIves/fetch-api-data-action@v2 | |
| with: | |
| # endpoint: https://example.com | |
| endpoint: "https://uscms-openproject.k8s.accre.vanderbilt.edu/api/v3/work_packages?filters=[{\"project\": {\"operator\": \"=\", \"values\": [\"35\"]}}]&pageSize=1000" | |
| # configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer ${{ secrets.API_TOKEN }}"} }' | |
| configuration: '{ "method": "GET", "headers": {"Authorization": "Basic ${{ secrets.API_TOKEN }}"} }' | |
| set-output: false | |
| save-name: wbs2 | |
| - name: Fetch API Data (WBS3)π¦ | |
| uses: JamesIves/fetch-api-data-action@v2 | |
| with: | |
| # endpoint: https://example.com | |
| endpoint: "https://uscms-openproject.k8s.accre.vanderbilt.edu/api/v3/work_packages?filters=[{\"project\": {\"operator\": \"=\", \"values\": [\"6\"]}}]&pageSize=1000" | |
| # configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer ${{ secrets.API_TOKEN }}"} }' | |
| configuration: '{ "method": "GET", "headers": {"Authorization": "Basic ${{ secrets.API_TOKEN }}"} }' | |
| set-output: false | |
| save-name: wbs3 | |
| - name: Fetch API Data (WBS4)π¦ | |
| uses: JamesIves/fetch-api-data-action@v2 | |
| with: | |
| # endpoint: https://example.com | |
| endpoint: "https://uscms-openproject.k8s.accre.vanderbilt.edu/api/v3/work_packages?filters=[{\"project\": {\"operator\": \"=\", \"values\": [\"8\"]}}]&pageSize=1000" | |
| # configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer ${{ secrets.API_TOKEN }}"} }' | |
| configuration: '{ "method": "GET", "headers": {"Authorization": "Basic ${{ secrets.API_TOKEN }}"} }' | |
| set-output: false | |
| save-name: wbs4 | |
| - name: Build and Deploy π | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: main # Pushes the updates to the main branch. | |
| folder: fetch-api-data-action # The location of the data.json file saved by the Fetch API Data action. | |
| target-folder: data # Saves the data into the 'data' directory on the main branch. |