forked from UCBoulder/sepe-awx-ee
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.1 KB
/
deploy.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
name: Deploy
concurrency: deploy
on:
push:
branches: [devel]
jobs:
release:
runs-on: ubuntu-22.04
name: Build and Deploy
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 -r build/requirements.txt
- name: Downcase repo path
run: |
echo "REPO=ghcr.io/${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Grab shortened SHA
run: |
echo "SHORT_SHA=${GITHUB_SHA::7}" >>${GITHUB_ENV}
- name: Build image
run: |
ansible-builder build -v3 --tag=${{ env.REPO }}/awx-ee:${{ env.SHORT_SHA }}
- name: Push image to GH packages
run: |
podman tag ${{ env.REPO }}/awx-ee:${{ env.SHORT_SHA }} ${{ env.REPO }}/awx-ee:latest
podman login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
podman push ${{ env.REPO }}/awx-ee:${{ env.SHORT_SHA }}
podman push ${{ env.REPO }}/awx-ee:latest