Skip to content

Merge pull request #117 from dokku/master #129

Merge pull request #117 from dokku/master

Merge pull request #117 from dokku/master #129

Workflow file for this run

---
name: CI
# yamllint disable-line rule:truthy
on:
pull_request:
branches:
- '*'
push:
branches:
- 'master'
- 'release'
jobs:
build:
name: build
runs-on: ubuntu-20.04
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v3
- name: extract branch name
shell: bash
run: |
if [[ "$GITHUB_REF" == *"/pull/"* ]]; then
echo "branch=${GITHUB_HEAD_REF#refs/heads/}" >> $GITHUB_OUTPUT
else
echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
fi
id: extract_branch
- name: setup
run: |
make version
if [[ "$CI_BRANCH" == "release" ]]; then
export PACKAGECLOUD_REPOSITORY=dokku/dokku
make .env.docker
fi
make ci-setup
env:
CI_BRANCH: ${{ steps.extract_branch.outputs.branch }}
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
- name: build
run: make build-docker-image build-in-docker
env:
CI_BRANCH: ${{ steps.extract_branch.outputs.branch }}
- name: test
run: make validate-in-docker
env:
CI_BRANCH: ${{ steps.extract_branch.outputs.branch }}
- name: upload packages
uses: actions/upload-artifact@v3
with:
name: build
path: build
- name: release
run: |
if [[ "$CI_BRANCH" == "release" ]]; then
make release-in-docker release-packagecloud-in-docker
fi
env:
CI_BRANCH: ${{ steps.extract_branch.outputs.branch }}