2024-03-06 10:46:42 +00:00
|
|
|
name: Build and Push Docker Image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-03-08 15:53:28 +00:00
|
|
|
- main
|
2024-03-06 10:47:40 +00:00
|
|
|
- dev
|
2024-03-06 10:46:42 +00:00
|
|
|
|
|
|
|
jobs:
|
2024-03-20 11:32:40 +00:00
|
|
|
checkout_repository:
|
2024-03-20 10:46:03 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-03-21 09:59:05 +00:00
|
|
|
|
2024-03-06 10:46:42 +00:00
|
|
|
steps:
|
2024-03-21 09:46:21 +00:00
|
|
|
- name: Checkout Repository
|
2024-03-22 07:46:00 +00:00
|
|
|
uses: actions/checkout@v4
|
2024-03-22 07:47:28 +00:00
|
|
|
|
2024-03-24 19:04:50 +00:00
|
|
|
- name: Test Gitea
|
|
|
|
run: |
|
|
|
|
echo "GITEA_Actor: ${{gitea.actor}}"
|
|
|
|
echo "GITEA_Repository: ${{gitea.repository}}"
|
|
|
|
echo "GITEA_REF_NAME: ${{gitea.ref_name}}"
|
2024-03-24 19:14:28 +00:00
|
|
|
echo "REGISTRY_USER: ${{secrets.registry_user}}"
|
2024-03-24 19:04:50 +00:00
|
|
|
|
2024-03-22 08:28:26 +00:00
|
|
|
# KANIKO
|
2024-03-22 14:04:43 +00:00
|
|
|
- name: Kaniko build and push
|
|
|
|
uses: aevea/action-kaniko@master
|
|
|
|
with:
|
|
|
|
build_file: Dockerfile
|
|
|
|
registry: git.coopgo.io
|
2024-03-24 19:14:28 +00:00
|
|
|
username: ${{secrets.registry_user}}
|
2024-03-24 19:00:26 +00:00
|
|
|
password: ${{secrets.registry_token}}
|
2024-03-22 14:04:43 +00:00
|
|
|
image: ${{gitea.repository}}
|
|
|
|
tag: ${{gitea.ref_name}}
|
|
|
|
cache: true
|
|
|
|
cache_registry: git.coopgo.io/${{gitea.repository}}/cache
|
|
|
|
extra-args: |
|
|
|
|
ACCESS_TOKEN_USR=${{gitea.actor}}
|
2024-03-24 19:00:26 +00:00
|
|
|
ACCESS_TOKEN_PWD=${{gitea.token}}
|
2024-03-24 19:04:50 +00:00
|
|
|
|