Skip to content

Commit

Permalink
another
Browse files Browse the repository at this point in the history
  • Loading branch information
papauorg committed Jul 10, 2024
1 parent 9c101e7 commit 291fcf3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/handle_scale_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
issues:
types: [ "opened", "edited" ]

env:
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/levelmeter

jobs:
process-issue:
if: contains(github.event.issue.labels.*.name, 'automatic-scale-request')
Expand Down Expand Up @@ -40,8 +43,8 @@ jobs:
DESCRIPTION=$(echo "$issue_body" | jq -r .description)
FILENAME="${CONTAINER_FORM}_${LENGTH_UNIT}_d${DIAMETER}_h${HEIGHT}_${MIN_VOLUME}-${MAX_VOLUME}${VOLUME_UNIT}_i1"
DEFINITION_FILE="./scales/definitions/$FILENAME.json"
VECTOR_FILE="./scales/svgs/$FILENAME.svg"
DEFINITION_FILE="scales/definitions/$FILENAME.json"
VECTOR_FILE="scales/svgs/$FILENAME.svg"
echo "Form: $CONTAINER_FORM"
echo "LengthUnit: $LENGTH_UNIT"
Expand Down Expand Up @@ -74,7 +77,8 @@ jobs:
./scales/definitions/_apply_filename_to_json.sh "$newFile"
- name: Generate scale svg
run: echo "This step should generate the SVG"
run: |
docker run --rm -v $(pwd):/config $IMAGE_NAME -c /config/${{ steps.parse_fields.outputs.definition_file }}
- name: Configure git
run: |
Expand All @@ -89,7 +93,7 @@ jobs:
(
git checkout $BRANCH_NAME || git checkout -b $BRANCH_NAME
)
git add "${{ steps.parse_fields.outputs.definition_file }}" "${{ steps.parse_fields.outputs.vector_file }}"
git commit -m "Add/Edit scale for scale request #${{ steps.issue_id.outputs.id }}"
git push origin $BRANCH_NAME
Expand Down

0 comments on commit 291fcf3

Please sign in to comment.