-
Notifications
You must be signed in to change notification settings - Fork 8
executable file
·65 lines (56 loc) · 1.83 KB
/
release.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
65
name: "Build and Release"
on:
push:
tags:
- 'v*'
jobs:
build_and_push_images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
RELEASE_VERSION: "${{ github.ref_name }}"
GHCR_REPO: "ghcr.io/ragul28/jmeter-k8s-cluster"
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name != 'pull_request'
- name: Build base docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker-files/base.Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.GHCR_REPO }}/jmeter-base:${{ env.RELEASE_VERSION }}
if: github.event_name != 'pull_request'
- name: Build master docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker-files/master.Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.GHCR_REPO }}/jmeter-master:${{ env.RELEASE_VERSION }}
if: github.event_name != 'pull_request'
- name: Build slave docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker-files/slave.Dockerfile
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.GHCR_REPO }}/jmeter-slave:${{ env.RELEASE_VERSION }}
if: github.event_name != 'pull_request'