-
Notifications
You must be signed in to change notification settings - Fork 12
41 lines (33 loc) · 1.24 KB
/
bld-oracle-data-api.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
name: Build Oracle Data API
# This workflow will automatically build the oracle-data-api project on the creation of a tag in Github.
# The build is then pushed to Openshift, tagged with the version of the github tag, ie. oracle-data-api:1.49.2
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Release Version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
# - name: Env
# run : |
# env
- name: Login to OpenShift
uses: docker/login-action@v1
with:
registry: ${{secrets.OPENSHIFT_EXTERNAL_REPOSITORY}}
username: ${{secrets.OPENSHIFT_SA_USERNAME}}
password: ${{secrets.OPENSHIFT_SA_PASSWORD}}
- name: Build and push
env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
CONTEXT: ./src/backend/oracle-data-api
IMAGE: ${{secrets.OPENSHIFT_EXTERNAL_REPOSITORY}}/${{secrets.OPENSHIFT_TOOLS_NAMESPACE}}/oracle-data-api:${{ env.RELEASE_VERSION }}
run: |
docker build --tag ${IMAGE} -f ${CONTEXT}/Dockerfile ${CONTEXT}
docker push ${IMAGE}