Skip to content

Test

Test #26

Workflow file for this run

name: Test
on:
workflow_dispatch:
push:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
test:
runs-on: ubuntu-latest
name: Release
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: nationalarchives/pronom-signatures
path: 'signature-files'
- name: Configure AWS credentials for Lambda
uses: aws-actions/[email protected]
with:
role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/SandboxGithubActionsDeployPronomWebsite
aws-region: eu-west-2
role-session-name: DeployPRONOM
- run: |
pip install boto3
pip install -r requirements.txt
mkdir -p site/fmt site/x-fmt
python .github/scripts/generate_pages.py "$PWD/signature-files"
cd site
aws s3 sync --quiet . s3://tna-pronom-signatures-spike
cd ..
python .github/scripts/generate_index_file.py "$PWD/signature-files"
mkdir -p package
pip install -r requirements.txt --target=package
cd package
zip -r ../function.zip .
cd ..
zip function.zip templates/index.html templates/search_results.html results.py indexes
aws lambda update-function-code --zip-file fileb://function.zip --function-name pronom-results