forked from ansible/awx-ee
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.39 KB
/
fp-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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: Insert netaddr into execution-environment.yml
run: |
awk '/python: \|$/{print;print " netaddr";next}1' execution-environment.yml > temp.yml && mv temp.yml execution-environment.yml
- 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
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 }} ghcr.io/fpm-git/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