Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Update AT host

Update AT host #1104

name: Update AT host
on:
workflow_dispatch:
schedule:
- cron: "0 1 * * *"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
update:
name: Update AT host
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: Fetch latest AT host
run: |
wget https://nordicsemiconductor.github.io/at_host-hex/at_host-thingy91_nrf9160_ns.hex -O at_host/thingy91_at_host_increased_buf.hex
wget https://nordicsemiconductor.github.io/at_host-hex/at_host-nrf9160dk_nrf9160_ns.hex -O at_host/91dk_at_host_increased_buf.hex
if [[ `git status --porcelain` ]]; then
echo "HAS_CHANGES=1" >> $GITHUB_ENV
git status
else
echo "HAS_CHANGES=0" >> $GITHUB_ENV
echo "No changes."
fi
- name: Commit changes
if: env.HAS_CHANGES == '1'
run: |
echo "machine github.com login accesskey password ${{ secrets.GITHUB_TOKEN }}" > ~/.netrc
git config --global user.email "[email protected]"
git config --global user.name "github-actions[bot]"
git add at_host
git commit -m "fix(at_host): update at_host"
git push
- name: Install dependencies
run: npm ci --no-audit
if: env.HAS_CHANGES == '1'
- name: Compile source
run: npx tsc
if: env.HAS_CHANGES == '1'
- name: Run tests
run: npm test
if: env.HAS_CHANGES == '1'
- uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
- name: Publish release
run: npx semantic-release
if: env.HAS_CHANGES == '1'