Update tables via Makefile #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update tables via Makefile | |
on: | |
workflow_dispatch: | |
# Inputs the workflow accepts. | |
inputs: | |
target: | |
# Friendly description to be shown in the UI instead of 'name' | |
description: 'Makefile target' | |
# Default value if no value is explicitly provided | |
default: 'update-esgf' | |
# Input has to be provided for the workflow to run | |
required: true | |
jobs: | |
update-tables: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup mamba | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
environment-file: environment.yml | |
miniforge-version: latest | |
miniforge-variant: Mambaforge | |
- name: Make | |
run: | | |
make ${{ github.event.inputs.target }} | |
- name: Commit | |
run: | | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email 'actions@github.com' | |
git commit -am "[Actions] ${{ github.event.inputs.target }} tables" | |
git push | |