Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,34 @@

name: Publish Docker image

on:
release:
types: [published]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
6 changes: 1 addition & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@

name: Test Docker image build

on:
pull_request:
push:
branches:
- main

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-image:
runs-on: ubuntu-latest
Expand All @@ -28,4 +24,4 @@ jobs:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
13 changes: 11 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v1.2.0
rev: v4.2.0
hooks:
- id: conventional-pre-commit
stages:
- commit-msg
args: ["build", "bump", "chore", "ci", "docs","feat", "fix", "perf", "refactor", "revert", "style", "test"]
args: ["build", "bump", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test"]
- repo: https://github.com/google/yamlfmt
rev: v0.14.0
hooks:
- id: yamlfmt
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ RUN mkdir bin && \
ln -s /home/iac-executor/.tgenv/bin/* /home/iac-executor/bin && \
./bin/tfenv --version && ./bin/tgenv --version

ENTRYPOINT ["/bin/bash"]
ENTRYPOINT ["/bin/bash"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ This repository includes a image that include all needed tools for managing clou
- sops
- tfenv
- tflint
- tgenv
- tgenv
1 change: 0 additions & 1 deletion cz.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
commitizen:
annotated_tag: true
name: cz_conventional_commits
Expand Down
5 changes: 4 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ default: build
init:
pre-commit install

validate:
pre-commit run -a

build:
docker build . -t terraform-pipeline-image:local

Expand All @@ -11,4 +14,4 @@ release:
git push
git push --tags

.PHONY: default init build release
.PHONY: default init validate build release