Skip to content

Commit

Permalink
Make logging for prep much earlier.
Browse files Browse the repository at this point in the history
  • Loading branch information
DFINITYManu committed Jun 25, 2024
1 parent ce8d930 commit 39e0dda
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/containers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Containers
on:
push:
branches:
- "main"
# delete next line before merge to main
pull_request: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
containers:
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-content-syncer

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: int128/kaniko-action@v1
name: Create airflow-content-syncer 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-content-syncer
3 changes: 1 addition & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ on:
push:
branches:
- "main"
- "v*"
pull_request: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
ci:
CI:
runs-on: ubuntu-latest
# This image is based on ubuntu:20.04
steps:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ description: Run battery of tests
runs:
using: composite
steps:
- name: "Prepare"
id: prep
run: |
out=$(make venv/bin venv/bin/mypy venv/bin/ruff venv/bin/pytest venv/lib/*/site-packages/mock 2>&1)
ret=$?
if [ $ret != 0 ]
then
echo "$out" >&2
exit $ret
fi
shell: bash

- name: "Ruff"
id: ruff
run: |
Expand Down
2 changes: 2 additions & 0 deletions airflow-content-syncer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM fedora:37

LABEL org.opencontainers.image.source="https://github.com/dfinity/dre-airflow"

RUN dnf install -y bash ca-certificates git rsync

COPY content-syncer /usr/local/bin/content-syncer
Expand Down

0 comments on commit 39e0dda

Please sign in to comment.