FP-Release #2
Workflow file for this run
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-Release | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
release: | |
runs-on: ubuntu-20.04 | |
name: Release | |
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: Build image | |
env: | |
DOCKER_BUILDKIT: 1 | |
run: | | |
tox -e docker -- --tag=ghcr.io/fpm-git/awx-ee:${{ github.event.release.tag_name }} | |
- name: Login to GitHub Container Registry | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Apply latest tag | |
run: | | |
docker tag ghcr.io/fpm-git/awx-ee:${{ github.event.release.tag_name }} quay.io/ansible/awx-ee:latest | |
- name: Push images | |
run: | | |
docker push ghcr.io/fpm-git/awx-ee:${{ github.event.release.tag_name }} | |
docker push ghcr.io/fpm-git/awx-ee:latest |