Skip to content

Commit

Permalink
No cache support for manual devcontainer build triggers (microsoft#511)
Browse files Browse the repository at this point in the history
One more minor tweak on microsoft#509 and microsoft#508. This allows us to force a rebuild
of the devcontainer with NO_CACHE=true manually without needing to push
an empty commit.
  • Loading branch information
bpkroth authored Sep 20, 2023
1 parent 3658226 commit de99169
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ on:
workflow_dispatch:
inputs:
tags:
description: Manual MLOS DevContainer run
description: Manual MLOS DevContainer run aux info tags
NO_CACHE:
type: boolean
description: Disable caching?
default: false
required: false
push:
branches: [ main ]
pull_request:
Expand Down Expand Up @@ -42,7 +47,7 @@ jobs:
} >> $GITHUB_OUTPUT
- name: Set NO_CACHE variable based on commit messages and for nightly builds
if: github.event_name == 'schedule' || contains(steps.get-commit-messages.outputs.COMMIT_MESSAGES, 'NO_CACHE=true')
if: github.event_name == 'schedule' || contains(steps.get-commit-messages.outputs.COMMIT_MESSAGES, 'NO_CACHE=true') || github.event.inputs.NO_CACHE == 'true'
run: |
echo "NO_CACHE=true" >> $GITHUB_ENV
Expand All @@ -57,6 +62,8 @@ jobs:
echo "COMMIT_MESSAGES: ${{ steps.get-commit-messages.outputs.COMMIT_MESSAGES }}"
echo "COMMIT_SHA: ${{ github.sha }}"
echo "git log -1 ${{ github.sha }}: $(git log -1 ${{ github.sha }})"
echo "Manual Trigger Input Tags: ${{ github.event.inputs.tags }}"
echo "Manual Trigger Input NO_CACHE: ${{ github.event.inputs.NO_CACHE }}"
# Output the full event json for debugging.
# cat ${{ github.event_path }}
Expand Down

0 comments on commit de99169

Please sign in to comment.