Skip to content

Commit

Permalink
minor enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
whummer committed Sep 23, 2023
1 parent 720c5d9 commit 687a813
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 31 deletions.
23 changes: 14 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,41 @@ inputs:
runs:
using: "composite"
steps:
- name: Prepare LocalStack Build
- name: Prepare PR comment
uses: LocalStack/setup-localstack/prepare@pr-integration
if: inputs.ci-project && inputs.github-token
with:
github-token: ${{ inputs.github-token }}
ci-project: ${{ inputs.ci-project }}
- name: Finish LocalStack Build

- name: Finalize PR comment
uses: LocalStack/setup-localstack/finish@pr-integration
if: inputs.github-token
if: inputs.ci-project && inputs.github-token
with:
github-token: ${{ inputs.github-token }}
ci-project: ${{ inputs.ci-project }}

- run: |
- name: Start LocalStack
run: |
pip install pyopenssl -U
if [ "$USE_PRO" = true ]; then
docker pull localstack/localstack-pro:"$IMAGE_TAG"
docker pull localstack/localstack-pro:"$IMAGE_TAG" &
CONFIGURATION="$CONFIGURATION DNS_ADDRESS=0"
else
docker pull localstack/localstack:"$IMAGE_TAG"
docker pull localstack/localstack:"$IMAGE_TAG" &
fi
pip install localstack
eval "${CONFIGURATION} localstack start -d"
localstack wait -t 30
if [ "$INSTALL_AWSLOCAL" = true ]; then
pip install awscli-local[ver1]
fi
export CI_PROJECT=${{ inputs.ci-project }}
eval "${CONFIGURATION} localstack start -d"
localstack wait -t 30
shell: bash
env:
IMAGE_TAG: "${{ inputs.image-tag }}"
Expand Down
21 changes: 1 addition & 20 deletions finish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Finish CI Build

on:
workflow_run:
workflows: ["Run CI Tests"]
workflows: ["*"]
types:
- completed

Expand Down Expand Up @@ -38,22 +38,3 @@ runs:
<!-- Sticky Pull Request Comment -->
body-include: '<!-- Sticky Pull Request Comment -->'
number: ${{ steps.pr.outputs.pr_id }}

# failed:
# runs-on: ubuntu-latest
# if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure'
# steps:
#
# - name: Save the PR ID
# id: pr
# run: echo "::set-output name=id::$(<pr-id.txt)"
#
# - name: Job failure
# uses: actions-cool/maintain-one-comment@v3.1.1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# body: |
# Deploy PR Preview failed.
# <!-- Sticky Pull Request Comment -->
# body-include: '<!-- Sticky Pull Request Comment -->'
# number: ${{ steps.pr.outputs.id }}
4 changes: 2 additions & 2 deletions prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Start CI Build
on: pull_request_target

inputs:
github_token:
github-token:
description: 'Github token used to create PR comments'
required: true
ci-project:
Expand All @@ -16,7 +16,7 @@ runs:
- name: Create initial PR comment
uses: actions-cool/maintain-one-comment@v3.1.1
with:
token: ${{ inputs.github_token }}
token: ${{ inputs.github-token }}
body: |
⚡️ Running CI build with LocalStack ...
<!-- Sticky Pull Request Comment -->
Expand Down

0 comments on commit 687a813

Please sign in to comment.