awips2/.github/workflows/update_NDM-v20.yml
ucar-tmeyer 00184e635d Update update_NDM-v20.yml file to install SVN
The yml file runs on ubuntu-latest which in Dec 2024 was the ubuntu-24.04 image which had to remove a number of default packages because the image was getting to large, which included SVN (subversion), so now we need to install this package before we can use it.

https://github.com/actions/runner-images/issues/10636
2024-12-26 08:51:39 -08:00

45 lines
1.5 KiB
YAML

name: update station info v20
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * *"
jobs:
update_ndm:
runs-on: ubuntu-latest
environment:
name: VLAB
steps:
# Install svn since it is no longer included by default in ubuntu-latest (ubuntu-24.04 image)
- name: Install svn package
run: |
sudo apt-get update
sudo apt-get install subversion
# Checkout this repo
# this gets the latest code (and is run on the default branch)
- name: Checkout awips2
uses: actions/checkout@v3
with:
ref: unidata_20.3.2
# Do individual pulls for all the files in the ndm directory
- name: Pull latest from vlab svn repo
run: |
cd rpms/awips2.edex/Installer.edex/ndm/
for file in *; do
svn export --force https://vlab.noaa.gov/svn/awips-ndm/trunk/"$file" --username ${{ secrets.VLAB_UNAME }} --password ${{ secrets.VLAB_PASS }}
done
# Check in all the new files
# Only do a git add/commit/push if files have changed
- name: Update existing NDM files for awips2 repo
run: |
date=`date +%Y%m%d-%H:%M:%S`
git config user.name $GITHUB_ACTOR
git config user.email $GITHUB_ACTOR@users.noreply.github.com
change=`git diff`
if [[ ! -z "$change" ]]
then
git add --all
git commit -m "New NDM updates on $date - autogenerated"
git push
fi