44 lines
1.1 KiB
YAML
44 lines
1.1 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@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
|
|
|
|
- name: Login to registry
|
|
uses: docker/login-action@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@v5
|
|
with:
|
|
context: .
|
|
file: ./tools/terraform-shell/Dockerfile
|
|
push: true
|
|
tags: ${{ env.REGISTRY_IMAGE_NAME }}:terraform |