mobility-accounts/.github/workflows/build.yml

40 lines
986 B
YAML
Raw Normal View History

name: Build and Push Docker Image
on:
push:
branches:
- main
- dev
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
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}}"
echo "REGISTRY_TOKEN: ${{secrets.registry_token}}"
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
username: ${{gitea.actor}}
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