-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (57 loc) · 1.81 KB
/
db.yml
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
55
56
57
58
59
60
61
62
63
64
name: DB
concurrency:
group: db-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
on:
workflow_call:
inputs:
DB_IMAGE:
required: true
type: string
jobs:
build-images:
name: '🐸 Build to JFrog'
runs-on: ubuntu-latest
#env:
# Proxy settings for local development / testing
#https_proxy: http://198.161.14.25:8080
# no_proxy: ${{ env.OPENSHIFT_SERVER }}
if: (github.ref_name == 'dev' || github.ref_name == 'test' || github.ref_name == 'prod')
steps:
- name: 📤 Checkout Target Branch
uses: actions/checkout@v4
with:
ref: dev
sparse-checkout: |
config/mariadb
example.env
example.versions.env
- name: Setup Env Vars
id: dotenv
uses: falti/dotenv-action@v1
with:
path: example.env
export-variables: true
keys-case: upper
- name: Setup Env Version Vars
id: dotenv_versions
uses: falti/dotenv-action@v1
with:
path: example.versions.env
export-variables: true
keys-case: upper
- name: Check Env Vars
run: |
echo Building and pushing DB_IMAGE: ${{ env.DB_IMAGE }}
# Login to Artifactory
- name: 🔑 Login to Artifactory
uses: docker/login-action@v3
with:
registry: ${{ secrets.ARTIFACTORY_URL }}
username: ${{ secrets.ARTIFACTORY_USER }}
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
- name: 🛠️ Pull latest DB base image then push to Artifactory
run: |
docker pull ${{ env.DB_IMAGE }}
docker tag ${{ env.DB_IMAGE }} ${{ secrets.ARTIFACTORY_URL }}/${{ env.DB_IMAGE }}
docker push ${{ secrets.ARTIFACTORY_URL }}/${{ env.DB_IMAGE }}