Move to sequential build #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |