Skip to content

Commit deae037

Browse files
chore: update docs + package project
1 parent 02306b2 commit deae037

File tree

3 files changed

+82
-23
lines changed

3 files changed

+82
-23
lines changed

Diff for: .github/workflows/deploy-image.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#
2+
name: Docker deploy
3+
4+
# Configures this workflow to run every time a change is pushed to the branch called `release`.
5+
on:
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
12+
env:
13+
REGISTRY: ghcr.io
14+
IMAGE_NAME: ${{ github.repository }}
15+
16+
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
17+
jobs:
18+
build-and-push-image:
19+
runs-on: ubuntu-latest
20+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
21+
permissions:
22+
contents: read
23+
packages: write
24+
attestations: write
25+
id-token: write
26+
#
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
31+
- name: Log in to the Container registry
32+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
33+
with:
34+
registry: ${{ env.REGISTRY }}
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
38+
- name: Extract metadata (tags, labels) for Docker
39+
id: meta
40+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
41+
with:
42+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
43+
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
44+
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
45+
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
46+
- name: Build and push Docker image
47+
id: push
48+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
49+
with:
50+
context: .
51+
push: true
52+
tags: ${{ steps.meta.outputs.tags }}
53+
labels: ${{ steps.meta.outputs.labels }}
54+
55+
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
56+
- name: Generate artifact attestation
57+
uses: actions/attest-build-provenance@v1
58+
with:
59+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
60+
subject-digest: ${{ steps.push.outputs.digest }}
61+
push-to-registry: true
62+
63+
environment:
64+
name: github-packages
65+
url: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}

Diff for: CONTRIBUTING.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# Contributing to GCP-streaming-pipeline
1+
# Contributing to data-consumer-pipeline
22

3-
Firstly, thank you very much for your interest in contributing to GCP-streaming-pipeline! This document provides guidelines to help ensure the contribution process is smooth and efficient for everyone involved.
3+
Firstly, thank you very much for your interest in contributing to data-consumer-pipeline! This document provides guidelines to help ensure the contribution process is smooth and efficient for everyone involved.
44

55
## How to Contribute
66

77
### 1. Fork the Repository
88

9-
1. Go to [repository page](https://github.com/IvanildoBarauna/GCP-streaming-pipeline).
9+
1. Go to [repository page](https://github.com/ivdatahub/data-consumer-pipeline).
1010
2. Click the "Fork" button in the top right corner to create a copy of the repository on your GitHub.
1111

1212
### 2. Clone the Repository
1313

1414
Clone the forked repository to your local machine using the command:
1515

1616
```sh
17-
git clone https://github.com/seu-usuario/GCP-streaming-pipeline.git
17+
git clone https://github.com/<your-username>/data-consumer-pipeline.git
1818
```
1919

2020
### 3. Create a Branch
@@ -67,7 +67,7 @@ git push origin branchname
6767

6868
## Reporting Bugs
6969

70-
If you find a bug, please open an [issue](https://github.com/IvanildoBarauna/GCP-streaming-pipeline/issues) and provide as much information as possible, including:
70+
If you find a bug, please open an [issue](https://github.com/ivdatahub/data-consumer-pipeline/issues) and provide as much information as possible, including:
7171

7272
- Detailed description of the problem.
7373
- Steps to reproduce the issue.
@@ -76,8 +76,8 @@ If you find a bug, please open an [issue](https://github.com/IvanildoBarauna/GCP
7676

7777
## Improvement suggestions
7878

79-
If you have suggestions for improvements, please open an [issue](https://github.com/IvanildoBarauna/GCP-streaming-pipeline/issues) and describe your idea in detail.
79+
If you have suggestions for improvements, please open an [issue](https://github.com/ivdatahub/data-consumer-pipeline/issues) and describe your idea in detail.
8080

8181
## Thanks
8282

83-
Thanks for considering contributing to GCP-streaming-pipeline! Every contribution is valuable and helps to improve the project.
83+
Thanks for considering contributing to data-consumer-pipeline! Every contribution is valuable and helps to improve the project.

Diff for: README.md

+10-16
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,44 @@
11
## Data Consumer Pipeline: Data Pipeline for ingest data in near real time
2+
23
![Project Status](https://img.shields.io/badge/status-development-yellow?style=for-the-badge&logo=github)
34
![Python Version](https://img.shields.io/badge/python-3.9-blue?style=for-the-badge&logo=python)
45
![License](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge&logo=mit)
56

6-
77
![Black](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge&logo=python)
88
![pylint](https://img.shields.io/badge/pylint-10.00-green?style=for-the-badge&logo=python)
99

10-
[//]: # ([![CI-CD]&#40;https://img.shields.io/github/actions/workflow/status/IvanildoBarauna/data-consumer-pipeline/CI-CD.yaml?&style=for-the-badge&logo=githubactions&cacheSeconds=60&label=Tests&#41;]&#40;https://github.com/IvanildoBarauna/data-consumer-pipeline/actions/workflows/CI-CD.yml&#41;)
11-
12-
[//]: # ([![IMAGE-DEPLOY]&#40;https://img.shields.io/github/actions/workflow/status/IvanildoBarauna/data-consumer-pipeline/deploy-image.yml?&style=for-the-badge&logo=github&cacheSeconds=60&label=Registry&#41;]&#40;https://github.com/IvanildoBarauna/data-consumer-pipeline/actions/workflows/deploy-cloud-run.yaml&#41;)
10+
[//]: # "[![CI-CD](https://img.shields.io/github/actions/workflow/status/ivdatahub/data-consumer-pipeline/CI-CD.yaml?&style=for-the-badge&logo=githubactions&cacheSeconds=60&label=Tests)](https://github.com/data-consumer-pipeline/data-consumer-pipeline/actions/workflows/CI-CD.yml)"
11+
[//]: # "[![IMAGE-DEPLOY](https://img.shields.io/github/actions/workflow/status/data-consumer-pipeline/data-consumer-pipeline/deploy-image.yml?&style=for-the-badge&logo=github&cacheSeconds=60&label=Registry)](https://github.com/data-consumer-pipeline/data-consumer-pipeline/actions/workflows/deploy-cloud-run.yaml)"
12+
[//]: # "[![GCP-DEPLOY](https://img.shields.io/github/actions/workflow/status/data-consumer-pipeline/data-consumer-pipeline/deploy-cloud-run.yaml?&style=for-the-badge&logo=google&cacheSeconds=60&label=Deploy)](https://github.com/data-consumer-pipeline/data-consumer-pipeline/actions/workflows/deploy-cloud-run.yaml)"
1313

14-
[//]: # ([![GCP-DEPLOY]&#40;https://img.shields.io/github/actions/workflow/status/IvanildoBarauna/data-consumer-pipeline/deploy-cloud-run.yaml?&style=for-the-badge&logo=google&cacheSeconds=60&label=Deploy&#41;]&#40;https://github.com/IvanildoBarauna/data-consumer-pipeline/actions/workflows/deploy-cloud-run.yaml&#41;)
15-
16-
17-
[![Codecov](https://img.shields.io/codecov/c/github/IvanildoBarauna/data-consumer-pipeline?style=for-the-badge&logo=codecov)](https://app.codecov.io/gh/IvanildoBarauna/data-consumer-pipeline)
14+
[![Codecov](https://img.shields.io/codecov/c/github/data-consumer-pipeline/data-consumer-pipeline?style=for-the-badge&logo=codecov)](https://app.codecov.io/gh/data-consumer-pipeline/data-consumer-pipeline)
1815

1916
## Project Summary
2017

2118
Pipeline for processing and consuming streaming data from Pub/Sub, integrating with Dataflow for real-time data processing
2219

23-
24-
2520
## Development Stack
2621

2722
[![My Skills](https://skillicons.dev/icons?i=pycharm,python,github,gcp&perline=7)](https://skillicons.dev)
2823

2924
## Cloud Stack (GCP)
25+
3026
<img src="docs/icons/pubsub.png" Alt="Pub/Sub" width="50" height="50"><img src="docs/icons/dataflow.png" Alt="Dataflow" width="50" height="50"><img src="docs/icons/bigquery.png" Alt="BigQuery" width="50" height="50">
3127

3228
- Pub/Sub: Messaging service provided by GCP for sending and receiving messages between FastAPI and Dataflow pipeline.
3329
- Dataflow: Serverless data processing service provided by GCP for executing the ETL process.
3430
- BigQuery: Fully managed, serverless data warehouse provided by GCP for storing and analyzing large datasets.
3531

3632
## Continuous Integration and Continuous Deployment (CI/CD, DevOps)
37-
![My Skills](https://skillicons.dev/icons?i=githubactions)
38-
3933

34+
![My Skills](https://skillicons.dev/icons?i=githubactions)
4035

4136
## Contributing
4237

4338
See the following docs:
4439

45-
- [Contributing Guide](https://github.com/IvanildoBarauna/data-consumer-pipeline/blob/main/CONTRIBUTING.md)
46-
- [Code Of Conduct](https://github.com/IvanildoBarauna/data-consumer-pipeline/blob/main/CODE_OF_CONDUCT.md)
40+
- [Contributing Guide](https://github.com/ivdatahub/data-consumer-pipeline/blob/main/CONTRIBUTING.md)
41+
- [Code Of Conduct](https://github.com/ivdatahub/data-consumer-pipeline/blob/main/CODE_OF_CONDUCT.md)
4742

4843
## Project Highlights:
4944

@@ -59,9 +54,8 @@ See the following docs:
5954

6055
- Documentation: Creation of detailed documentation to facilitate the understanding and use of the application, including installation instructions, usage examples and troubleshooting guides.
6156

62-
6357
# Data Pipeline Process:
6458

6559
1. Data Extraction: The data extraction process consists of making requests to the API to obtain the data. The requests are made in parallel workers using Cloud Dataflow to optimize the process. The data is extracted in JSON format.
6660
2. Data Transformation: The data transformation process consists of converting the data to BigQuery Schema. The transformation is done using Cloud Dataflow in parallel workers to optimize the process.
67-
3. Data Loading: The data loading process consists of loading the data into BigQuery. The data is loaded in parallel workers using Cloud Dataflow to optimize the process.
61+
3. Data Loading: The data loading process consists of loading the data into BigQuery. The data is loaded in parallel workers using Cloud Dataflow to optimize the process.

0 commit comments

Comments
 (0)