Skip to content

Download Manifest #1125

Download Manifest

Download Manifest #1125

name: Download Manifest
on:
# Run daily
schedule:
- cron: '30 12 * * *'
# Manual run, for debugging purposes.
workflow_dispatch:
inputs: {}
jobs:
Download_Manifest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
major: [15, 16, 17]
type: [release, pre]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ matrix.type }}-${{ matrix.major }}
- name: Remove old channels and manifests
run: rm -f raw_channel.json channel.json raw_manifest.json manifest.json
- name: Downloads current latest channels
run: |
curl -L https://aka.ms/vs/${{ matrix.major }}/${{ matrix.type }}/channel -o raw_channel.json
# Make a version that's easy to diff and view.
jq . raw_channel.json > channel.json
- name: Check if build is internal MS-only
id: check-internal-domain
run: |
url=$(jq -r '.channelItems | map(select(.type == "Manifest")) | .[0].payloads[0].url' raw_channel.json)
echo "URL is '${url}'"
if [[ "$url" == *"vsdrop.corp.microsoft.com"* ]]; then
echo "INTERNAL_URL=true" >> $GITHUB_OUTPUT
fi
- name: Download current latest manifests
if: steps.check-internal-domain.outputs.INTERNAL_URL != 'true'
run: |
url=$(jq -r '.channelItems | map(select(.type == "Manifest")) | .[0].payloads[0].url' raw_channel.json)
echo $url
curl -L $url -o raw_manifest.json
jq . raw_manifest.json > manifest.json
- uses: EndBug/add-and-commit@v7
with:
branch: ${{ matrix.type }}-${{ matrix.major }}
default_author: github_actions
message: Update manifest
pull_strategy: 'NO-PULL'
push: true