diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1d244d5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build +on: [pull_request, push] +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: akerl/action-checkout@v2.3.4 + with: + submodules: recursive + - name: Registry auth + run: docker login docker.pkg.github.com -u nobody -p ${{ github.token }} + - name: Make + env: + PKGFORGE_STATEFILE: /tmp/pkgforge + run: make + - name: Release + env: + PKGFORGE_STATEFILE: /tmp/pkgforge + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + if: startsWith(github.ref, 'refs/tags/') + run: make release + - name: Store + uses: akerl/upload-artifact@v2.2.2 + with: + name: pkg + path: pkg + - name: Notify on success + if: success() + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + uses: akerl/github-action-slack-notify-build@v1.2.0 + with: + channel_id: ${{ secrets.SLACK_BOT_CHANNEL }} + status: success + color: good + - name: Notify on failure + if: failure() + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + uses: akerl/github-action-slack-notify-build@v1.2.0 + with: + channel_id: ${{ secrets.SLACK_BOT_CHANNEL }} + status: failed + color: danger + diff --git a/.gitignore b/.gitignore index b07d682..5dc7b26 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ /bin /vendor/ /pkg/ -/.github /payload.zip /.tools/ /Dockerfile diff --git a/README.md b/README.md index 7e5c1ed..79e1c52 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ prospectus ========= -[![Build Status](https://img.shields.io/travis/com/akerl/prospectus.svg)](https://travis-ci.com/akerl/prospectus) +[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/akerl/prospectus/Build)](https://github.com/akerl/prospectus/actions)) [![GitHub release](https://img.shields.io/github/release/akerl/prospectus.svg)](https://github.com/akerl/prospectus/releases) [![MIT Licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://tldrlegal.com/license/mit-license)