-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2065 from coronasafe/staging
- Loading branch information
Showing
30 changed files
with
358 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Create Release on Branch Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- production | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: Release on Push | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Necessary to fetch all tags | ||
|
||
- name: Calculate next tag | ||
id: calc_tag | ||
run: | | ||
YEAR=$(date +"%y") | ||
WEEK=$(date +"%V") | ||
LAST_TAG=$(git tag -l "v$YEAR.$WEEK.*" | sort -V | tail -n1) | ||
LAST_TAG=$(echo "$LAST_TAG" | tr -d '\r' | sed 's/[[:space:]]*$//') | ||
echo "Last Tag: $LAST_TAG" | ||
if [[ $LAST_TAG == "" ]]; then | ||
MINOR=0 | ||
else | ||
MINOR=$(echo $LAST_TAG | awk -F '.' '{print $NF}') | ||
echo "Minor Version: $MINOR" | ||
MINOR=$((MINOR + 1)) | ||
fi | ||
TAG="v$YEAR.$WEEK.$MINOR" | ||
echo "TAG=$TAG" >> $GITHUB_ENV | ||
echo "Next Tag: $TAG" | ||
- name: Configure git | ||
run: | | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
- name: Create and push tag | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git tag -a "$TAG" -m "Release $TAG" | ||
git push origin "$TAG" | ||
- name: Create release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release create "$TAG" \ | ||
--repo="$GITHUB_REPOSITORY" \ | ||
--title="$TAG" \ | ||
--generate-notes \ | ||
--draft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
care/facility/migrations/0422_alter_facilityinventorylog_quantity_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 4.2.10 on 2024-03-22 11:21 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("facility", "0421_merge_20240318_1434"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="facilityinventorylog", | ||
name="quantity", | ||
field=models.FloatField( | ||
default=0, validators=[django.core.validators.MinValueValidator(0.0)] | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="facilityinventoryminquantity", | ||
name="min_quantity", | ||
field=models.FloatField( | ||
default=0, validators=[django.core.validators.MinValueValidator(0.0)] | ||
), | ||
), | ||
] |
Oops, something went wrong.