Compare commits
No commits in common. "2aec61e520c8b4489519ab8d2ccb18be3095cdf4" and "a636b54a94625e110df09936dfa7214e2aa88bcc" have entirely different histories.
2aec61e520
...
a636b54a94
|
@ -1,82 +0,0 @@
|
|||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
build_and_push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Install Docker
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y docker.io
|
||||
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set Kubernetes Context
|
||||
uses: azure/k8s-set-context@v4
|
||||
with:
|
||||
method: kubeconfig
|
||||
kubeconfig: ${{secrets.buildx_kubeconfig}}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: kubernetes
|
||||
driver-opts: |
|
||||
namespace=gitea
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.coopgo.io
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker image
|
||||
id: metadata
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: git.coopgo.io/${{gitea.repository}}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=tag
|
||||
type=ref,event=pr
|
||||
flavor: |
|
||||
latest=auto
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ steps.metadata.outputs.tags }}
|
||||
build-args: |
|
||||
ACCESS_TOKEN_USR=${{gitea.actor}}
|
||||
ACCESS_TOKEN_PWD=${{gitea.token}}
|
||||
|
||||
# BUILD WITH KANIKO
|
||||
# - name: Kaniko build and push
|
||||
# uses: aevea/action-kaniko@master
|
||||
# with:
|
||||
# build_file: Dockerfile
|
||||
# registry: git.coopgo.io
|
||||
# username: ${{secrets.registry_user}}
|
||||
# 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}}
|
||||
|
Loading…
Reference in New Issue