Skip to content

Commit

Permalink
fix(ci): add check drift
Browse files Browse the repository at this point in the history
  • Loading branch information
FabrizioCafolla committed Jun 2, 2024
1 parent 5759120 commit 0bdd64c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ permissions:
env:
WORKSPACE: "production"

inputs:
hash-commit:
description: "Hash commit of awesome-italia-opensource"
required: false
default: null

jobs:
build-website:
name: Build
Expand All @@ -27,6 +33,8 @@ jobs:
else
echo "COMMIT_SHA=${{ github.event.client_payload.slash_command.args.named.pr_sha }}" >> $GITHUB_ENV
fi
echo ${{ github.event.client_payload }}
echo ${{ inputs.hash-commit }}
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -59,13 +67,21 @@ jobs:
AWS_TERRAFORM_STATE_BUCKET: ${{ secrets.AWS_TERRAFORM_STATE_BUCKET }}

- name: Build
id: build
timeout-minutes: 5
run: |
make setup-website VIRTUAL_ENV=false
make download
make build
if [[ "$(git status -s)" == "" ]] ; then
echo "has_changed=false" >> "$GITHUB_OUTPUT"
else
echo "has_changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Create Pull Request
if: ${{ steps.build.outputs.has_changed == 'true' }}
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.ACTION_WORKFLOWS }}
Expand Down

0 comments on commit 0bdd64c

Please sign in to comment.