40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Build Terraform Shell Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "tools/terraform-shell/**"
|
|
schedule:
|
|
- cron: "@monthly"
|
|
workflow_dispatch:
|
|
|
|
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@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4
|
|
with:
|
|
registry: ${{ vars.REGISTRY_URL }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Build and push shell image
|
|
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7
|
|
with:
|
|
context: .
|
|
file: ./tools/terraform-shell/Dockerfile
|
|
push: true
|
|
tags: ${{ vars.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/coder-base:terraform |