generated from deploymenttheory/Template
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 981 Bytes
/
docker-build.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
name: Manual | Build and Push Docker Image - docker/python
run-name: "Build New Python Docker Image"
on:
workflow_dispatch:
inputs:
terraform_version:
type: string
default: "1.9.8"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/python
push: true
secrets: |
pat_token=${{ secrets.PAT_TOKEN }}
build-args: VERSION=${{ inputs.terraform_version }}
tags: |
ghcr.io/${{ github.repository }}/python_tf:latest
ghcr.io/${{ github.repository }}/python_tf:${{ github.sha }}