Skip to content

Commit

Permalink
Upload CI/CD workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
david-martinez-garcia committed Oct 15, 2024
1 parent 0b056d1 commit 6e53bcf
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 58 deletions.
File renamed without changes.
27 changes: 0 additions & 27 deletions .github/workflows/ci.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/docker-build-and-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and push Docker image to GitHub Packages

# Trigger the workflow on release creation for the main branch:
on:
release:
types: [released]

jobs:
docker_image_build_and_push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

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

# Log in to GitHub Docker Registry (GitHub Packages):
- name: Log in to GitHub Docker Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

# Build the Docker image:
- name: Build Docker image
run: docker build -t ghcr.io/${{ github.repository }}:latest --build-arg optional_dependencies=test,kafka,sqlite,mysql,postgresql,oracle,mssql,excel,tabular,spss,kuzu,neo4j .

# Push the Docker image to GitHub Packages:
- name: Push Docker image to GitHub Packages
run: docker push ghcr.io/${{ github.repository }}:latest

# Tag the Docker image with the release version:
- name: Tag the Docker image with the release version
run: docker tag ghcr.io/${{ github.repository }}:latest ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}

# Push the Docker image with the release version to GitHub Packages:
- name: Push the Docker image with the release version to GitHub Packages
run: docker push ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
24 changes: 24 additions & 0 deletions .github/workflows/gitlab-synchronization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Synchronization with GitLab Repository

on:
- push
- delete

jobs:
gitlab-synchronization:
runs-on: ubuntu-latest
name: Synchronization with GitLab Repository
steps:
# Checkout repository:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

# Synchronize GitHub repository with GitLab repository (GitHub is upstream repository)
- name: Synchronize GitHub repository with GitLab repository (GitHub is upstream repository)
uses: wangchucheng/git-repo-sync@v0.1.0
with:
target-url: ${{ secrets.TARGET_URL }}
target-username: ${{ secrets.TARGET_USERNAME }}
target-token: ${{ secrets.TARGET_TOKEN }}
31 changes: 0 additions & 31 deletions .github/workflows/pypi-publish.yml

This file was deleted.

0 comments on commit 6e53bcf

Please sign in to comment.