-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.45 KB
/
build-deploy-dev.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
55
56
name: smk-composite-action-tests
# used on push for testing / development
# on:
# push:
on:
pull_request:
# debug: remove the dev,putting build action on non existent branches for debug
branches: ['master', 'main']
types: ['opened', 'reopened']
paths-ignore:
- openshift/**
- .vscode/**
- docs/**
- .gitignore
- LICENSE
- open-api.json
- readme.md
- helm-charts
- code_of_conduct.md
jobs:
# This workflow contains a single job called "build"
buildjob:
defaults:
run:
shell: bash
name: 'Build SMK container image'
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
OPENSHIFT_SERVER_URL: ${{secrets.OPENSHIFT_SERVER_URL}}
OPENSHIFT_TOKEN_DEV: ${{secrets.OPENSHIFT_TOKEN_DEV}}
OPENSHIFT_TOKEN_PROD: ${{secrets.OPENSHIFT_TOKEN_PROD}}
GHCR_USER: ${{ secrets.GHCR_USER }}
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
DEBUG_DEPLOY: false
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
if: env.DEBUG_DEPLOY == 'false'
id: checkout
with:
fetch-depth: 0
- name: Deleting older images
uses: actions/delete-package-versions@v5
with:
package-name: 'smk-moh-cymh/smk-moh-cymh'
package-type: 'container'
token: ${{ secrets.GHCR_TOKEN }}
min-versions-to-keep: 2