Skip to content

build postfix_exporter #155

build postfix_exporter

build postfix_exporter #155

Workflow file for this run

---
name: build postfix_exporter
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
schedule:
# run on 12:00 every monday
- cron: '0 12 * * 1'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Checkout repo
uses: actions/checkout@v2
- name: mkdir builddir
run: |
mkdir builddir
- name: Clone kumina postfix_exporter
uses: actions/checkout@v2
with:
repository: kumina/postfix_exporter
path: builddir/
- name: Run vet
run: |
cd builddir
go vet -tags nosystemd .
- name: Build
run: |
cd builddir
go build -tags nosystemd .
- name: Commit files
run: |
mkdir -p ./files
rm -rf ./files/postfix_exporter
mv builddir/postfix_exporter ./files
rm -rf builddir/
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -f files/postfix_exporter
git commit --allow-empty -m "built new version" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}