Skip to content

Commit

Permalink
fix: debug building docker image from poetry.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
d-a-bunin committed Oct 18, 2023
1 parent e757e05 commit 16eb033
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Build image
run: |
cd $( dirname ${{ matrix.dockerfile.path }})
sed -i '/etna\[all\]/d' requirements.txt
sed -i 's#etna\[all\]#etna[all] @ git+https://github.com/${{ github.repository }}.git@${{ github.sha }}#g' requirements.txt
poetry export --without-hashes --format=requirements.txt >> requirements.txt
cat requirements.txt
docker build . --tag image
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,28 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: |
poetry install -E all -vv
- name: Build image
run: |
cd $( dirname ${{ matrix.dockerfile.path }})
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
sed -i "s#etna\[all\]#etna\[all\]==$VERSION#g" requirements.txt
poetry export --without-hashes --format=requirements.txt >> requirements.txt
cat requirements.txt
docker build . --tag image
- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository }}/${{ matrix.dockerfile.name }}
Expand Down

0 comments on commit 16eb033

Please sign in to comment.