Skip to content

Publish MSFT ASN IP Ranges #713

Publish MSFT ASN IP Ranges

Publish MSFT ASN IP Ranges #713

name: Publish MSFT ASN IP Ranges
permissions: write-all
# This workflow will run once a day at 12 or on push or pull request events but only for the "master" branch
on:
#push:
#branches: [ "master" ]
#pull_request:
#branches: [ "master" ]
schedule:
- cron: '0 12 * * *'
# Allows this workflow to run manually from the Actions tab
workflow_dispatch:
jobs:
Publish_MSFT_ASN_IP_Ranges:
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Get current date long
id: date_long
#run: echo "date_long={$(date +'%Y%m%d%S')}" >> $GITHUB_OUTPUT
run: echo "::set-output name=date::$(date +'%Y%m%d%S')"
# Checks-out this repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v3
# Runs get_msft_ips.ps1 with PS
- name: Run get_msft_ips Script
shell: pwsh
run: ./get_msft_ips.ps1
- name: Create Release
id: create_release
uses: actions/create-release@v1
#uses: ncipollo/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.date_long.outputs.date }}
release_name: ${{ steps.date.outputs.date }}
draft: false
prerelease: false
#removeArtifacts: true
#makeLatest: true
#exclude: .zip
- name: Build Artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./msft_asn_ip_ranges.txt
asset_name: msft_asn_ip_ranges.txt
asset_content_type: text/plain
#removeArtifacts: TRUE