Skip to content
name: Build and Publish Docker Image
on:
push:
branches:
- master
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5
jobs:
setup-build-publish:
name: Setup, Build and Publish
runs-on: ubuntu-latest
environment: production
steps:
- name: Set Version ENV
run: echo "VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
- name: Build and Push Docker Image
run: |
echo "Version: ${{ env.VERSION }}"
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: setup-build-publish
environment: production
steps:
- name: Deploy
run: |
echo "Version: ${{ env.VERSION }}"