wip #152
Workflow file for this run
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: branch | |
on: | |
push: | |
branches: | |
- '*' | |
- '!master' | |
workflow_dispatch: | |
inputs: | |
publish_container: | |
description: 'Publish container' | |
required: true | |
default: 'false' | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run tests | |
run: | | |
yarn install --frozen-lockfile | |
yarn bundle | |
yarn run test test | |
- name: Prepare builder | |
run: make builder.build | |
- name: Build package | |
run: | | |
make package.build.container | |
- name: Build and smoke test docker image | |
run: | | |
make image.build | |
docker run --rm -t $(make get.image) --version | grep $(make get.version) | |
docker run --rm -t -e EXPOSR_SELF_TEST=1 $(make get.image) | |
- name: Set up QEMU | |
if: github.event.inputs.publish_container == 'true' | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
if: github.event.inputs.publish_container == 'true' | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to ghcr.io | |
if: github.event.inputs.publish_container == 'true' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish versioned container to ghcr.io | |
if: github.event.inputs.publish_container == 'true' | |
run: | | |
make publish=true registry=ghcr.io/exposr image.xbuild |