Skip to content

Commit

Permalink
test on pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
kolok committed Dec 12, 2024
1 parent 31894e6 commit 6389854
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,23 @@ runs:
with:
region: ${{ inputs.SCALINGO_APP_REGION }}
- name: Login Scalingo CLI
shell: bash
run: |
scalingo login --api-token ${{ inputs.SCALINGO_API_TOKEN }}
- name: Generate timestamped file name
id: generate_filename
shell: bash
run: |
TIMESTAMP=$(date +'%Y%m%d_%H%M%S')
echo "TIMESTAMPED_FILE_NAME=${TIMESTAMP}_${{ inputs.FILE_NAME }}" >> $GITHUB_ENV
- name: Execute sync script in one-off container
shell: bash
run: |
scalingo --app ${{ inputs.SCALINGO_APP }} run \
python manage.py export_displayedacteur --file ${{ env.TIMESTAMPED_FILE_NAME }}
continue-on-error: true
- name: Get file from s3
shell: bash
run: |
aws --endpoint-url ${{ inputs.S3_HOST }} s3 cp ${{ inputs.S3_BUCKET }}/exports/${{ env.TIMESTAMPED_FILE_NAME }} ${{ env.TIMESTAMPED_FILE_NAME }}
- name: Save file to artefact
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/preprod_export_acteur_open_license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: "✅ Export des Acteurs sous licence ouverte en PREPROD"

on:
workflow_dispatch:
pull_request:

env:
DUPLICATE_API_TOKEN: ${{ secrets.DUPLICATE_API_TOKEN }}
Expand All @@ -23,7 +24,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Export Displayed Acteur
uses: ./.github/actions/export_displayedacteur
uses: ./.github/actions/export_acteur
with:
SCALINGO_API_TOKEN: ${{ env.DUPLICATE_API_TOKEN }}
SCALINGO_APP: ${{ env.PREPROD_APP }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod_export_acteur_open_license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Export Displayed Acteur
uses: ./.github/actions/export_displayedacteur
uses: ./.github/actions/export_acteur
with:
SCALINGO_API_TOKEN: ${{ env.DUPLICATE_API_TOKEN }}
SCALINGO_APP: ${{ env.PRODUCTION_APP }}
Expand Down

0 comments on commit 6389854

Please sign in to comment.