Skip to content

Instantly share code, notes, and snippets.

@kenmuse
Created November 8, 2022 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenmuse/436a25c1ba65155e26d1fe958a47a223 to your computer and use it in GitHub Desktop.
Save kenmuse/436a25c1ba65155e26d1fe958a47a223 to your computer and use it in GitHub Desktop.
name: Publish to ADF Alt Flow
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# Put the actual resource details here (or replace env.TARGET_RESOURCE with secrets.TARGET_RESOURCE to use a secret).
TARGET_RESOURCE: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup/providers/Microsoft.DataFactory/factories/dataFactory'
jobs:
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3.5.1
with:
node-version: 16.x
- name: Initialize
run: npm install @microsoft/azure-data-factory-utilities
# working-directory: ${{ github.workspace }}
- name: Validate Files
run: node ./node_modules/@microsoft/azure-data-factory-utilities/lib/index validate "${{ github.workspace }}" "${{ env.TARGET_RESOURCE }}"
# working-directory: ${{ github.workspace }}
- name: Generate Files
run: node ./node_modules/@microsoft/azure-data-factory-utilities/lib/index --preview export "${{ github.workspace }}" "${{ env.TARGET_RESOURCE }}" "_export"
# working-directory: ${{ github.workspace }}
- uses: actions/upload-artifact@v3
with:
name: Templates
path: ${{ github.workspace }}/_export
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment