41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: Test and Build Docker Image
|
|
run-name: 🐋
|
|
on: [push]
|
|
jobs:
|
|
Test-Build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
|
- name: List files in the repository
|
|
run: |
|
|
ls ${{ gitea.workspace }}
|
|
- run: python --version
|
|
- run: pip --version
|
|
- run: pip install -r requirements.txt
|
|
|
|
Build-Image:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
#- name: Set up QEMU
|
|
# uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: git.oki.cx
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITEA_TOKEN }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
push: true
|
|
tags: user/app:latest |