Skip to content

Commit

Permalink
ci: working on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr0p42 committed Jul 24, 2024
1 parent 19798f7 commit 812a9c6
Showing 1 changed file with 41 additions and 20 deletions.
61 changes: 41 additions & 20 deletions .github/workflows/wip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,60 @@ on:
branches:
- 178-schedule-abi-using-github-action

# jobs:
# build:
# runs-on: ubuntu-latest

# steps:
# - name: Checkout repository
# uses: actions/checkout@v2

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1

# - name: Cache Docker layers
# uses: actions/cache@v2
# with:
# path: /tmp/.buildx-cache
# key: ${{ runner.os }}-buildx-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-buildx-

# - name: Log in to GitHub Container Registry
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

# - name: Build Docker image
# run: |
# make build
# docker tag abi:latest ghcr.io/${{ github.repository }}/abi:latest

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

# - name: Run Papermill
# run: docker run --rm --platform linux/amd64 ghcr.io/${{ github.repository }}/abi:latest papermill main.ipynb output.ipynb

jobs:
build:
pull_and_run:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
run: |
make build
docker tag abi:latest ghcr.io/${{ github.repository }}/abi:latest
- name: Push Docker image to GitHub Container Registry
run: docker push ghcr.io/${{ github.repository }}/abi:latest
- name: Pull Docker image
run: docker pull ghcr.io/${{ github.repository }}/abi:latest

- name: Run Papermill
run: docker run --rm --platform linux/amd64 ghcr.io/${{ github.repository }}/abi:latest papermill main.ipynb output.ipynb
run: docker run --rm -it --platform linux/amd64 ghcr.io/${{ github.repository }}/abi:latest papermill main.ipynb output.ipynb

0 comments on commit 812a9c6

Please sign in to comment.