Files
coder-base/.gitea/workflows/build-terraform-shell.yml
T
2026-03-17 06:01:03 +00:00

44 lines
1.2 KiB
YAML

name: Build Terraform Shell Image
on:
push:
branches:
- main
paths:
- 'tools/terraform-shell/**'
schedule:
- cron: '@monthly'
workflow_dispatch:
env:
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
REGISTRY_IMAGE_NAME: ${{ secrets.REGISTRY_IMAGE_NAME }}
jobs:
build:
name: Build Terraform Shell Image
runs-on: ubuntu-latest
concurrency:
group: terraform
cancel-in-progress: false
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Login to registry
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ${{ secrets.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push shell image
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
with:
context: .
file: ./tools/terraform-shell/Dockerfile
push: true
tags: ${{ env.REGISTRY_IMAGE_NAME }}:terraform