Skip to content

Instantly share code, notes, and snippets.

Avatar

Sarah Lean weeyin83

View GitHub Profile
View adocronexample.yml
```yml
# Basic pipeline that runs at midnight every day of the working week for the main branch.
trigger:
# YAML file in the release branch
schedules:
- cron: "0 0 * * 1-5"
displayName: Daily build at midnight (Monday-Friday)
branches:
include:
View adocron.yml
```yml
trigger:
# YAML file in the release branch
schedules:
- cron: "0 0 * * 1-5"
displayName: Daily build at midnight (Monday-Friday)
branches:
include:
- main
```
View chocoazurevm.ps1
$OctopusServer = $Args[0]
$OctopusAPI = $Args[1]
$workerPool = $Args[2]
$Space = $Args[3]
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install git azure-cli powershell-core awstools.powershell awssamcli awscli octopusdeploy.tentacle -y
View cronworkflow.yml
name: Trigger Action on a CRON Schedule
on:
schedule:
# Runs "At 11:00 on every day-of-week from Monday through Friday"
- cron: '0 11 * * 1-5'
jobs:
build:
name: Trigger Code Checkout
View cronexplained.yml
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * * <command to execute>
View testbuild.yml
name: Test Build
on:
push:
pull_request:
schedule:
- cron: '00 1 * * 1' # At 01:00 on Mondays.
View cloudformation.yml
# This is a basic workflow to help you get started with Actions
name: Lint Test CFN templates
# 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
@weeyin83
weeyin83 / outputs.yml
Created May 9, 2022
AWS CloudFormation template outputs
View outputs.yml
Outputs:
S3Bucket:
Description: Bucket Created using this template.
Value: !Ref S3Bucket
@weeyin83
weeyin83 / resources.yml
Created May 9, 2022
AWS CloudFormation template resources section
View resources.yml
Resources:
S3Bucket:
DeletionPolicy: Retain
Type: 'AWS::S3::Bucket'
Description: Creating Amazon S3 bucket from CloudFormation
Properties:
AccessControl: Private
PublicAccessBlockConfiguration:
BlockPublicAcls: true
BlockPublicPolicy: true