Skip to content

fix: Axum Migration #91

fix: Axum Migration

fix: Axum Migration #91

Workflow file for this run

name: Earthly CI
on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- .github/**
- .vscode/**
- README.md
- doc/**
- .devcontainer/**
pull_request:
paths-ignore:
- .github/**
- .vscode/**
- README.md
- doc/**
- .devcontainer/**
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v2
- name: Put back the git branch into git (Earthly uses it for tagging)
run: |
branch=""
if [ -n "$GITHUB_HEAD_REF" ]; then
branch="$GITHUB_HEAD_REF"
else
branch="${GITHUB_REF##*/}"
fi
git checkout -b "$branch" || true
- name: Docker Login
run: docker login -u ${{ secrets.USERNAME }} -p ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Download latest earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Earthly version
run: earthly --version
# Earthly with caching https://docs.earthly.dev/docs/guides/shared-cache
- name: Run build and Deploy Containers (Read Write Caching)
if: github.ref == 'refs/heads/master'
run: earthly --allow-privileged --ci --remote-cache=purtontech/barricade:cache --push +all
- name: Run build and Deploy Containers (Read Only Cache)
if: github.ref != 'refs/heads/master'
run: earthly --allow-privileged --ci --remote-cache=purtontech/barricade:cache +all
- name: Bring the image back from docker so we can tag it
if: github.ref == 'refs/heads/master'
run: docker pull purtontech/barricade:build
- name: Setup Node.js for Semantic Release
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Semantic Release
run: |
npm i -D @semantic-release-plus/docker
npm i -D @semantic-release/git
npx semantic-release