-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 1.49 KB
/
full.ecommerce.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Atlas CI Public
on:
push:
branches:
- master
pull_request:
paths:
- "dirs/ecommerce/migrations/*"
jobs:
atlas:
permissions:
contents: read
id-token: write
pull-requests: write
services:
mysql:
image: mysql:8.0.29
env:
MYSQL_ROOT_PASSWORD: pass
MYSQL_DATABASE: dev
ports:
- "3306:3306"
options: >-
--health-cmd "mysqladmin ping -ppass"
--health-interval 10s
--health-start-period 10s
--health-timeout 5s
--health-retries 10
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Atlas
uses: ariga/setup-atlas@v0
with:
cloud-token: ${{ secrets.ATLAS_PUBLIC_TENANT_TOKEN }}
- name: Lint
uses: ariga/atlas-action/migrate/lint@v1
if: github.ref != 'refs/heads/master'
with:
dir: file://dirs/ecommerce/migrations
dir-name: ariga-atlas-showcase-dirs-ecommerce-migrations
dev-url: mysql://root:pass@localhost:3306/dev
- name: Push
if: github.ref == 'refs/heads/master'
uses: ariga/atlas-action/migrate/push@v1
with:
dir: file://dirs/ecommerce/migrations
dir-name: ariga-atlas-showcase-dirs-ecommerce-migrations
dev-url: mysql://root:pass@localhost:3306/dev
tag: ${{ github.sha }}