Skip to content

Commit

Permalink
airflow image push to registry
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanLouisLamezec committed Oct 10, 2024
1 parent e36a2ce commit 49cc0b7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/deploy_airflow_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Push a new version of Airflow image

on:
push:
tags:
- 'airflow-v*.*.*'

jobs:

build_and_push_image:
name: Build and push image to Registry
runs-on: ubuntu-latest
steps:
- uses: OpenSourcePolitics/build-and-push-images-action@master
with:
registry: ${{ vars.REGISTRY_ENDPOINT }}
namespace: ${{ vars.REGISTRY_NAMESPACE }}
password: ${{ secrets.TOKEN }}
image_name: ${{ vars.IMAGE_NAME }}
tag: ${{ github.ref }}

10 changes: 0 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
FROM apache/airflow:2.10.1-python3.10
# Passer à l'utilisateur root pour installer des paquets et modifier /etc/hosts
USER root

# Mettre à jour les paquets et installer iputils-ping et nano
RUN apt-get update \
&& apt-get install -y iputils-ping nano
# Repasser à l'utilisateur airflow
USER airflow

# Copier le fichier requirements
COPY requirements.txt /tmp/

# Installer les providers nécessaires pour Airflow
RUN pip install apache-airflow-providers-airbyte[http] \
&& pip install apache-airflow-providers-airbyte==4.0.0 \
&& pip install apache-airflow-providers-github

# Copier les DAGs avec la bonne propriété
COPY --chown=airflow:root /dags /opt/airflow/dags

0 comments on commit 49cc0b7

Please sign in to comment.