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
38 changes: 38 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI/CD - Docker Image from DECS Branch

on:
pull_request:
types: [closed]
branches: [ "develop" ]

jobs:
build-and-push:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

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

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Generate tag from branch name
id: generate_tag
run: |
BRANCH_NAME=${{ github.event.pull_request.head.ref }}
TAG_VERSION=${BRANCH_NAME#decs}
echo "Extracted tag version: $TAG_VERSION"
echo "TAG_NAME=$TAG_VERSION" >> $GITHUB_OUTPUT

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
dguailab/decs:${{ steps.generate_tag.outputs.TAG_NAME }}
dguailab/decs:latest
40 changes: 0 additions & 40 deletions .github/workflows/tag.yml

This file was deleted.

Loading