Build and Push latest image #333
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Push latest image | |
| on: | |
| push: | |
| # build and push anytime commits are merged to devel | |
| branches: | |
| - main | |
| schedule: | |
| # build every 24 hours at an arbitrary time | |
| - cron: '45 3 * * *' | |
| jobs: | |
| build_and_push_latest: | |
| runs-on: ubuntu-24.04 | |
| name: Build and push latest tag from devel and on new commits | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install tox | |
| - name: Build image | |
| env: | |
| DOCKER_BUILDKIT: 1 | |
| run: | | |
| tox -e docker -- --tag=ghcr.io/${{ github.repository_owner }}/ascender-ee:latest | |
| - name: Push images | |
| run: | | |
| echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
| docker push ghcr.io/${{ github.repository_owner }}/ascender-ee:latest |