Skip to content

Commit

Permalink
🔨 Update CI/CD workflow to tag release versions and push to Docker re…
Browse files Browse the repository at this point in the history
…gistry. (#226)

* 🔨 Update CI/CD workflow to tag release versions and push to Docker registry.

* 🔧 Update workflow file name to reflect the action performed.

* 🔧 Update GitHub Actions workflows to use main branch trigger.

* ⬆️ Change workflow to check versions on pull requests.

* ✨ Fix typo in workflow file.

* ✨ Bump version and create release on tag push.

* 🔧 Fix incorrect tag condition in pr-build.yaml.

* 🛠️ Remove unnecessary Docker metadata action.

* 🔧 Update docker image tagging with semver patterns and values.
  • Loading branch information
gregkonush authored Sep 1, 2024
1 parent 84871f8 commit 5816f51
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/docker-build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- "main"
tags:
- "v*"

jobs:
docker:
Expand All @@ -28,13 +26,11 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
gitea.proompteng.ai/d/lab/ecran
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{version}},value=${{ steps.tag_version.outputs.new_tag }}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -52,7 +48,6 @@ jobs:
platforms: linux/arm64
context: ./apps/ecran
file: ./apps/ecran/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=gitea.proompteng.ai/d/lab/ecran:main
Expand Down
1 change: 0 additions & 1 deletion apps/ecran/src/app/problems/[id]/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { InferSelectModel } from 'drizzle-orm'
type Problem = InferSelectModel<typeof problems>

export async function createProblem(data: FormData) {
console.log(data)
const result = await db
.insert(problems)
.values({
Expand Down
2 changes: 1 addition & 1 deletion apps/ecran/src/app/problems/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
import { eq } from 'drizzle-orm'

export default async function Problem({ params: { id } }: { params: { id: string } }) {
logger.info('Loading problem', { id })
logger.info(`Loading problem ${id}`)
if (id === 'create') {
return (
<form action={createProblem} className="space-y-4 min-w-full">
Expand Down

0 comments on commit 5816f51

Please sign in to comment.