-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.18 KB
/
build.yml
File metadata and controls
42 lines (35 loc) · 1.18 KB
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
name: Build and Push Docker Image
on:
workflow_dispatch:
permissions:
contents: read
packages: write
env:
DOCKER_REGISTRY: ghcr.io
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: interviewandhealth
IMAGE_NAME: speech-to-text
IMAGE_TAG: v${{ github.run_number }}
jobs:
build:
name: Build Image and Push to GitHub Container Registry
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
registry: ${{ env.DOCKER_REGISTRY }}
- name: Build Docker Image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ env.DOCKER_REGISTRY }}/${{ env.GITHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
${{ env.DOCKER_REGISTRY }}/${{ env.GITHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
${{ env.DOCKER_REGISTRY }}/${{ env.GITHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ github.sha }}