Skip to content

Commit

Permalink
Merge pull request #3 from vvarg229/fix
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-khimov committed Jan 16, 2024
2 parents e96b441 + 82b7743 commit c1a6ff5
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,16 @@ runs:
MANUAL_RUN_LIFETIME: ${{ inputs.MANUAL_RUN_LIFETIME }}
OTHER_LIFETIME: ${{ inputs.OTHER_LIFETIME }}
run: |
CURRENT_EPOCH=$(neofs-cli netmap epoch --rpc-endpoint $NEOFS_NETWORK_DOMAIN:8080)
if [[ "${{ github.event_name }}" == "push" ]]; then
LIFETIME=$((MASTER_LIFETIME + CURRENT_EPOCH))
LIFETIME="$MASTER_LIFETIME"
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
LIFETIME=$((PR_LIFETIME + CURRENT_EPOCH))
LIFETIME="$PR_LIFETIME"
elif [[ "${{ github.event_name }}" == "release" ]]; then
LIFETIME=0 # For test reports from releases - no LIFETIME period
elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
LIFETIME=$((MANUAL_RUN_LIFETIME + CURRENT_EPOCH))
LIFETIME="$MANUAL_RUN_LIFETIME"
else
LIFETIME=$((OTHER_LIFETIME + CURRENT_EPOCH))
fi
if [[ "$LIFETIME" -eq "$CURRENT_EPOCH" ]]; then
LIFETIME=0 # 0 is no expiration period
LIFETIME="$OTHER_LIFETIME"
fi
echo "LIFETIME=$LIFETIME" >> $GITHUB_ENV
Expand Down

0 comments on commit c1a6ff5

Please sign in to comment.