-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (36 loc) · 1.3 KB
/
test.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
name: Testing Container
on: [push]
jobs:
testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible-builder
- name: Set branch name environment variable
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g')" >> $GITHUB_ENV
- name: Build EE with Docker
env:
DOCKER_BUILDKIT: 1
run: |
ansible-builder build -v3 --tag=ghcr.io/arillso/kubernetes:${{ env.BRANCH_NAME }} --tag=arillso/kubernetes:${{ env.BRANCH_NAME }} --container-runtime=docker
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: sbaerlocher
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push
run: |
docker push ghcr.io/arillso/kubernetes:${{ env.BRANCH_NAME }}
docker push arillso/kubernetes:${{ env.BRANCH_NAME }}