Skip to content

Commit

Permalink
fix: Build docker image as part of release process.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjw authored Mar 22, 2023
1 parent 8c0af66 commit c3cc0e7
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Docker
run: |
sudo apt-get install -y docker.io
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -54,18 +57,10 @@ jobs:
run: |
git config --global user.email "andrewjwilkinson@gmail.com"
git config --global user.name "Andrew Wilkinson"
PYPI_TOKEN=${{ secrets.PYPI_TOKEN }} semantic-release publish
docker:
runs-on: ubuntu-latest
environment: Production
if: github.repository == 'andrewjw/glowprom' && contains(github.ref, 'refs/tags/')
needs: build
steps:
- uses: actions/checkout@v3
- name: Install Docker
run: |
sudo apt-get install -y docker.io
- name: Install Docker
run: |
DOCKER_TOKEN=${{ secrets.DOCKER_TOKEN }} ./docker_push.sh
export CURRENT=$(semantic-release print-version --current)
export VERSION=$(semantic-release print-version)
if [ "$CURRENT" -neq "$VERSION" ]; then
PYPI_TOKEN=${{ secrets.PYPI_TOKEN }} semantic-release publish
DOCKER_TOKEN=${{ secrets.DOCKER_TOKEN }} TAG=$VERSION ./docker_push.sh
fi

0 comments on commit c3cc0e7

Please sign in to comment.