Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a holiday check to the production tag process, including an override. #855

Merged
merged 2 commits into from
Jan 7, 2025
Merged
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
22 changes: 19 additions & 3 deletions .github/workflows/production-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ name: Create Production Tag

on:
workflow_dispatch:
inputs:
override_code_freeze:
type: boolean
description: "Override code freeze and create production tag"
default: false
workflow_run:
workflows: ['Continuous Integration']
types: [completed]
branches: [main]

concurrency:
group: production-tag
cancel-in-progress: true
Expand All @@ -16,11 +20,23 @@ env:
DSVA_SCHEDULE_ENABLED: true

jobs:
holiday-checker:
runs-on: ubuntu-latest
outputs:
is_holiday: ${{ steps.holiday-check.outputs.is_holiday }}
steps:
- name: Check if today is a holiday
id: holiday-check
uses: department-of-veterans-affairs/vsp-github-actions/holiday-checker@main
create-production-tag:
name: Create Production Tag
runs-on: ubuntu-latest
# Run the workflow unless it was triggered by CI and that failed
if: ${{ !(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'failure') }}
needs: holiday-checker
# Do not run the workflow during VA holidays unless we explicitly override it.
# Run the workflow unless it was triggered by CI and that failed.
if: >
(needs.holiday-checker.outputs.is_holiday == 'false' || (inputs && inputs.override_code_freeze))
&& !(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'failure')
outputs:
RELEASE_NAME: ${{ steps.export-release-name.outputs.RELEASE_NAME }}
permissions:
Expand Down
Loading