Skip to content
Open
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
8 changes: 7 additions & 1 deletion .github/workflows/deploy.yaml → .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: CD

on:
workflow_call:
Expand All @@ -22,6 +22,11 @@ on:
required: false
default: "bud-apps"
description: Project to search for file on `k8s_repository`
docker_target:
type: string
required: false
default: "run"
description: docker step to create image
secrets:
AWS_ACCESS_KEY_ID:
required: true
Expand Down Expand Up @@ -61,6 +66,7 @@ jobs:
file: Dockerfile
push: true
tags: "${{ steps.login-ecr.outputs.registry }}/${{ env.REPO }}:${{ env.TAG }}"
target: "${{ inputs.docker_target }}"
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}

Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
workflow_call:
inputs:
docker_target:
type: string
required: false
default: "test"
description: docker step to run

env:
REPO: ${{ github.event.repository.name }}
TAG: ${{ github.sha }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Build and push image to ECR
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: false
tags: "${{ env.REPO }}:${{ env.TAG }}"
target: "${{ inputs.docker_target }}"