Skip to content

add docker image build and push on release #1

add docker image build and push on release

add docker image build and push on release #1

Workflow file for this run

name: Build and Push Docker Image
on:
release:
types: [created]
push:
tags:
- '[0-9]+.[0-9]+.[0-9]*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
7cav/api:${{ github.ref_name }}
7cav/api:latest