Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ trigger:
branches:
include:
- main
- dev
- support/v1
tags:
include:
Expand All @@ -15,7 +14,6 @@ pr:
branches:
include:
- main
- dev
- support/v1
variables:
buildPlatform: 'Any CPU'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CodeQL Analysis

on:
push:
branches: [ main, dev ]
branches: [ main, support/v1 ]
pull_request:
schedule:
- cron: '0 8 * * *'
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ name: Publish Docker image
on:
workflow_dispatch:
push:
branches: [main, dev, support/v1]
paths: ['src/Microsoft.OpenApi.Hidi/**', '.github/workflows/**']
tags: ["v*"]
branches: [main]
pull_request:
env:
REGISTRY: msgraphprod.azurecr.io
IMAGE_NAME: public/openapi/hidi
PREVIEW_BRANCH: "refs/heads/main"
jobs:
push_to_registry:
environment:
Expand All @@ -28,14 +30,24 @@ jobs:
echo "::set-output name=version::${version}"
shell: pwsh
id: getversion
- name: Get truncated run number
if: contains(github.ref, env.PREVIEW_BRANCH)
id: runnumber
run: echo "runnumber=$(echo ${{ github.run_number }} | awk '{ print substr($0, length($0)-3, length($0)) }')" >> $GITHUB_OUTPUT
- name: Get current date
if: contains(github.ref, env.PREVIEW_BRANCH)
id: date
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
- name: Push to registry - Nightly
if: ${{ github.ref == 'refs/heads/dev' }}
if: contains(github.ref, env.PREVIEW_BRANCH)
uses: docker/[email protected]
with:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }}-preview.${{ steps.date.outputs.date }}${{ steps.runnumber.outputs.runnumber }}
build-args: |
version_suffix=preview.${{ steps.date.outputs.date }}${{ steps.runnumber.outputs.runnumber }}
- name: Push to registry - Release
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/support/v1' }}
if: contains(github.ref, 'refs/tags/v')
uses: docker/[email protected]
with:
push: true
Expand Down
Loading