feat: guy fawkes bonfire night fire gif #115
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: WebUI CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
defaults: | |
run: | |
working-directory: web | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: '1.12' # Define the elixir version [required] | |
otp-version: '24' # Define the OTP version [required] | |
- name: Restore dependencies cache | |
uses: actions/cache@v2 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Run tests | |
run: mix test | |
env: | |
ADMIN_PASS: admin | |
API_TOKEN: api_admin | |
SECRET_KEY_BASE: DDyMkkTIcIMVgub9/HtLUyJ/tkJM+4Ls0K/yAO22GFmLTHnStvlDwhv/b+hhOkas | |
docker-release: | |
name: Docker Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Version | |
run: echo "version=$(grep 'version:' mix.exs | cut -d '"' -f2)" >> "$GITHUB_OUTPUT" | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Container Metadata | |
id: metadata | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
ghcr.io/${{ github.repository_owner }}/infolab-lights | |
flavor: | | |
latest=false | |
prefix= | |
suffix= | |
tags: | | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=raw,value=${{ steps.Version.outputs.version }} | |
- name: Build and Push Container | |
uses: docker/build-push-action@v4 | |
with: | |
context: web | |
file: web/Dockerfile | |
build-args: | | |
APP_VSN=${{ steps.Version.outputs.version }} | |
push: true | |
platforms: linux/amd64 | |
tags: ${{ steps.metadata.outputs.tags }} | |
labels: ${{ steps.metadata.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |