Skip to content

Commit

Permalink
Set environment variables with info about the release
Browse files Browse the repository at this point in the history
Close #1
  • Loading branch information
dentarg committed Nov 5, 2022
1 parent 5a84276 commit b8685c5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ runs:
env:
FLY_API_TOKEN: "${{ inputs.fly-token }}"

- name: Lookup app release version
shell: bash
run: |
echo "FLY_RELEASE_VERSION=$(fly releases --json | jq 'max_by(.Version).Version')" >> $GITHUB_ENV
env:
FLY_API_TOKEN: "${{ inputs.fly-token }}"

- name: Create deployment in GitHub
if: ${{ inputs.github-token }}
shell: bash
Expand All @@ -45,7 +52,11 @@ runs:
- name: Deploy to Fly
shell: bash
run: flyctl deploy --remote-only
run: |
flyctl deploy --remote-only \
--env RELEASE_COMMIT=$(git rev-parse --verify HEAD) \
--env RELEASE_CREATED_AT=$(date --iso-8601=seconds) \
--env RELEASE_VERSION="v$(( $FLY_RELEASE_VERSION + 1 ))"
env:
FLY_API_TOKEN: "${{ inputs.fly-token }}"

Expand Down

0 comments on commit b8685c5

Please sign in to comment.