summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Pöschl <Poeschl@users.noreply.github.com>2021-05-15 09:43:26 +0200
committerMarkus Pöschl <Poeschl@users.noreply.github.com>2021-05-15 14:39:26 +0200
commitda9c05696449becbe5e66588afa549bc3409662f (patch)
tree5bd5c3d7fc3d2b6d6b034cee7a58de0a387e6420
parent76a89d267564ab466ba6a8c719bc1f6a3a23abb3 (diff)
Ensure correct version inside docker container
-rw-r--r--.github/workflows/build.yml80
-rw-r--r--docker-files/debian.Dockerfile2
2 files changed, 43 insertions, 39 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b8aae130..ba83fa83 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -19,8 +19,48 @@ on:
- v*
jobs:
- buildx:
+
+ pypi:
+ runs-on: ubuntu-latest
+ steps:
+
+ - uses: actions/checkout@v2
+
+ - name: Install pip install build tools
+ run: >-
+ python -m
+ pip install
+ build
+ --user
+
+ - name: Build a binary wheel and a source tarball
+ run: >-
+ python -m
+ build
+ --sdist
+ --wheel
+ --outdir dist/
+
+ - name: Publish distribution package to Test PyPI
+ uses: pypa/gh-action-pypi-publish@master
+ with:
+ user: __token__
+ password: ${{ secrets.TEST_PYPI_API_TOKEN }}
+ repository_url: https://test.pypi.org/legacy/
+ skip_existing: true
+
+ - name: Publish distribution package to PyPI
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
+ uses: pypa/gh-action-pypi-publish@master
+ with:
+ user: __token__
+ password: ${{ secrets.PYPI_API_TOKEN }}
+
+ docker-images:
runs-on: ubuntu-latest
+ # Make sure we release the python package first. So we are sure to get the latest.
+ needs:
+ - pypi
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -106,7 +146,7 @@ jobs:
push: ${{ env.PUSH_BRANCH == 'true' }}
tags: ${{ steps.config.outputs.fullTag }}
build-args: |
- ACTION_ID=${{env.GITHUB_ACTION}}
+ CHANGING_ARG=${{env.GITHUB_SHA}}
context: .
file: docker-files/debian.Dockerfile
target: full
@@ -114,39 +154,3 @@ jobs:
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
-
- pypi:
- runs-on: ubuntu-latest
- steps:
-
- - uses: actions/checkout@v2
-
- - name: Install pip install build tools
- run: >-
- python -m
- pip install
- build
- --user
-
- - name: Build a binary wheel and a source tarball
- run: >-
- python -m
- build
- --sdist
- --wheel
- --outdir dist/
-
- - name: Publish distribution package to Test PyPI
- uses: pypa/gh-action-pypi-publish@master
- with:
- user: __token__
- password: ${{ secrets.TEST_PYPI_API_TOKEN }}
- repository_url: https://test.pypi.org/legacy/
- skip_existing: true
-
- - name: Publish distribution package to PyPI
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
- uses: pypa/gh-action-pypi-publish@master
- with:
- user: __token__
- password: ${{ secrets.PYPI_API_TOKEN }}
diff --git a/docker-files/debian.Dockerfile b/docker-files/debian.Dockerfile
index f5924f65..f9f1777a 100644
--- a/docker-files/debian.Dockerfile
+++ b/docker-files/debian.Dockerfile
@@ -20,7 +20,7 @@ RUN apt-get update && \
FROM build as remoteInstall
# Force rebuild otherwise it could be cached without rerun
-ARG ACTION_ID
+ARG CHANGING_ARG
RUN pip3 install --no-cache-dir --user glances[all]