Skip to content

Merge pull request #159 from aprsorg/hessu-allocations #25

Merge pull request #159 from aprsorg/hessu-allocations

Merge pull request #159 from aprsorg/hessu-allocations #25

Workflow file for this run

name: Build and Deploy
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install deps
run: |
sudo apt-get install -y \
perl perl-modules \
libyaml-tiny-perl libjson-perl libxml-writer-perl libxml-writer-perl
- name: validate and build
run: |
tools/validate.pl
cp -a tocalls.yaml generated/
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: aprs-deviceid-release
path: |
generated
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Download artifacts
uses: actions/download-artifact@master
with:
name: aprs-deviceid-release
path: build
- name: Sync artifacts with AWS S3
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 sync --exclude "*.xml" \
./build "s3://$AWS_S3_BUCKET" \
--region eu-west-1
aws s3 cp \
./build/tocalls.xml "s3://$AWS_S3_BUCKET/tocalls.xml" \
--content-type "application/xml; charset=utf-8" \
--region eu-west-1