40 lines
986 B
YAML
40 lines
986 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- dev
|
|
|
|
jobs:
|
|
checkout_repository:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Test Gitea
|
|
run: |
|
|
echo "GITEA_Actor: ${{gitea.actor}}"
|
|
echo "GITEA_Repository: ${{gitea.repository}}"
|
|
echo "GITEA_REF_NAME: ${{gitea.ref_name}}"
|
|
echo "REGISTRY_TOKEN: ${{secrets.registry_token}}"
|
|
|
|
# KANIKO
|
|
- name: Kaniko build and push
|
|
uses: aevea/action-kaniko@master
|
|
with:
|
|
build_file: Dockerfile
|
|
registry: git.coopgo.io
|
|
username: ${{gitea.actor}}
|
|
password: ${{secrets.registry_token}}
|
|
image: ${{gitea.repository}}
|
|
tag: ${{gitea.ref_name}}
|
|
cache: true
|
|
cache_registry: git.coopgo.io/${{gitea.repository}}/cache
|
|
extra-args: |
|
|
ACCESS_TOKEN_USR=${{gitea.actor}}
|
|
ACCESS_TOKEN_PWD=${{gitea.token}}
|
|
|