Skip to content

Test if there is no vars file #35

Test if there is no vars file

Test if there is no vars file #35

Workflow file for this run

name: Build
on:
push:
branches:
- '*'
jobs:
build:
name: 👷 Build
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.10.1
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: ⬇️ Check out
uses: actions/checkout@v3.1.0
with:
fetch-depth: 1
- run: echo "Building"
docker-build:
name: 📦 Docker build
runs-on: ubuntu-latest
needs:
- "build"
steps:
- name: ⬇️ Check out
uses: actions/checkout@v3.1.0
with:
fetch-depth: 1
- name: 🐋 Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PAT }} # `PAT` is a secret that contains your Personal Access Token with `write:packages` scope
- name: 🐋 Build and push docker image
uses: docker/build-push-action@v3.1.1
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
tags: |
ghcr.io/gimlet-io/gais:${{ github.sha }}
deploy-preview:
name: 🧪 Deploy / Preview
runs-on: ubuntu-latest
needs:
- "docker-build"
if: github.ref != 'refs/heads/main'
environment: preview
steps:
- name: ⬇️ Check out
uses: actions/checkout@v3.1.0
with:
fetch-depth: 1
- name: 🧪 Deploy / Preview
uses: gimlet-io/gimlet-artifact-shipper-action@v0.9.0-rc.1
with:
DEBUG: "true"
DEPLOY: "true"
ENV: "preview"
APP: "gais"
env:
GIMLET_SERVER: ${{ secrets.GIMLET_SERVER }}
GIMLET_TOKEN: ${{ secrets.GIMLET_TOKEN }}
deploy-staging:
name: 🚀 Deploy / Staging
runs-on: ubuntu-latest
needs:
- "docker-build"
if: github.ref == 'refs/heads/main'
environment: staging
steps:
- name: ⬇️ Check out
uses: actions/checkout@v3.1.0
with:
fetch-depth: 1
- name: 🚀 Deploy / Staging
uses: gimlet-io/gimlet-artifact-shipper-action@v0.9.0-rc.1
with:
DEPLOY: "true"
ENV: "staging"
APP: "gais"
env:
GIMLET_SERVER: ${{ secrets.GIMLET_SERVER }}
GIMLET_TOKEN: ${{ secrets.GIMLET_TOKEN }}
deploy-production:
name: 🧑‍🚀 Deploy / Production
runs-on: ubuntu-latest
needs:
- "deploy-staging"
if: github.ref == 'refs/heads/main'
environment: production
steps:
- name: ⬇️ Check out
uses: actions/checkout@v3.1.0
with:
fetch-depth: 1
- name: 🚀 Deploy / Production
uses: gimlet-io/gimlet-artifact-shipper-action@v0.9.0-rc.1
with:
DEPLOY: "true"
ENV: "production"
APP: "gais"
env:
GIMLET_SERVER: ${{ secrets.GIMLET_SERVER }}
GIMLET_TOKEN: ${{ secrets.GIMLET_TOKEN }}