Skip to content

Commit

Permalink
Merge pull request #2127 from microsoft/ci/remove-dev
Browse files Browse the repository at this point in the history
ci: removes dev from triggers
  • Loading branch information
baywet authored Feb 6, 2025
2 parents f889937 + 503602e commit ca4128b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
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

0 comments on commit ca4128b

Please sign in to comment.