-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from dfinity/containers
Separate builds of our own customized Airflow container and the content syncer one.
- Loading branch information
Showing
3 changed files
with
84 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Airflow customized container | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- airflow-customized/** | ||
- .github/** | ||
pull_request: | ||
paths: | ||
- airflow-customized/** | ||
- .github/** | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-airflow-customized: | ||
name: Build customized Airflow container | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
# This image is based on ubuntu:20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/metadata-action@v5 | ||
id: metadata | ||
with: | ||
images: ghcr.io/${{ github.repository }}/airflow-customized | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
type=ref,event=pr | ||
type=sha,format=long | ||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: int128/kaniko-action@v1 | ||
name: Create airflow-customized container | ||
with: | ||
push: false | ||
tags: ${{ steps.metadata.outputs.tags }} | ||
labels: ${{ steps.metadata.outputs.labels }} | ||
cache: false | ||
cache-repository: ghcr.io/${{ github.repository }}/cache | ||
context: airflow-customized | ||
publish-airflow-customized: | ||
name: Publish customized Airflow container | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
# This image is based on ubuntu:20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: docker/metadata-action@v5 | ||
id: metadata | ||
with: | ||
images: ghcr.io/${{ github.repository }}/airflow-customized | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
type=ref,event=pr | ||
type=sha,format=long | ||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: int128/kaniko-action@v1 | ||
name: Create and publish airflow-customized container | ||
with: | ||
push: true | ||
tags: ${{ steps.metadata.outputs.tags }} | ||
labels: ${{ steps.metadata.outputs.labels }} | ||
cache: false | ||
cache-repository: ghcr.io/${{ github.repository }}/cache | ||
context: airflow-customized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters