FP Build and Push latest image #20
This file contains 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: FP Build and Push latest image | |
on: | |
push: | |
# build and push anytime commits are merged to devel | |
branches: | |
- devel | |
schedule: | |
- cron: '30 1 * * *' | |
jobs: | |
build_and_push_latest: | |
runs-on: ubuntu-20.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.9" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
- name: Replace default tox.ini with custom version | |
run: | | |
cp fp_tox.ini tox.ini | |
- name: Insert netaddr into execution-environment.yml | |
run: | | |
sed -i '/python: |$/a \ \ \ \ netaddr' execution-environment.yml | |
- name: Build image | |
env: | |
DOCKER_BUILDKIT: 1 | |
run: | | |
tox -e docker -- --tag=ghcr.io/fpm-git/awx-ee:latest | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push images | |
run: | | |
docker push ghcr.io/fpm-git/awx-ee:latest |