Skip to content

Build

Build #169

Workflow file for this run

name: "Build"
on:
workflow_dispatch:
schedule:
- cron: '45 3 * * 4' # At 03:45 on Thursday
jobs:
build-pricing:
name: Pricing information
runs-on: ubuntu-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v4
- name: 🔧 Install dependencies
run: |
sudo apt-get install \
libapp-options-perl \
libwww-perl \
libjson-xs-perl \
libyaml-libyaml-perl \
libdbd-csv-perl \
libdbd-sqlite3-perl
# https://github.com/marketplace/actions/setup-go-environment
- name: 🔧 Setup go
uses: actions/setup-go@v5
with:
go-version-file: 'gcosts/go.mod'
cache-dependency-path: '**/go.sum'
# Compile build/skus CLI
- name: 🍳 Build build/skus
run: cd build && make native && ./skus --version
# Compile gcosts CLI
- name: 🍳 Build gcosts
run: cd gcosts && make native && ./gcosts --version
# Export SKUs and do mapping
- name: 📥 Export SKUs and do mapping
env:
API_KEY: ${{ secrets.API_KEY }}
run: |
cd build || exit 9
bash skus.sh
# Generate pricing informations
- name: ⏳ Generate Pricing
run: cd build && perl pricing.pl -details=0
# Test pricing
- name: 🌡️ Test
run: |
cd t && \
bash gcosts.sh && \
bash test.sh
# Copy new pricing.yml for release
- name: 🤝 Copy
run: cd build && mv pricing.yml ../pricing.yml
# Last diff check
- name: 🛂 Control
run: cd t && bash diffcheck.sh
# Release (push)
- name: ✨ Release
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add pricing.yml && \
git commit -m "Pricing updated" && \
git push