-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.09 KB
/
build_prod.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
name: Build image on MAIN branch
on:
push:
tags:
- 'v*'
pull_request:
tags:
- 'v*'
jobs:
package-image:
runs-on: ubuntu-latest
environment:
name: production # Set the environment name
steps:
- uses: actions/checkout@v4
- name: Login to VngCloud Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.VCR_REGISTRY }}
username: ${{ secrets.VCR_USERNAME }}
password: ${{ secrets.VCR_PASSWORD }}
- name: Get previous tag
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 1.0.0 # Optional fallback tag to use when no tag can be found
#workingDirectory: another/path/where/a/git/repo/is/checked/out # Optional alternative working directory
- name: Build and push vngcloud-blockstorage-csi-driver image
env:
NEW_VERSION: ${{ steps.previoustag.outputs.tag }}
run: |
export REGISTRY=${{ vars.VCR_REGISTRY }}
export VERSION=${{ github.ref_name }}
make bush-local-images