35 lines
916 B
YAML
35 lines
916 B
YAML
name: Build and push image
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and push image
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
- name: Create Kubeconfig
|
|
run: |
|
|
mkdir $HOME/.kube
|
|
echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config
|
|
- name: Login to Docker Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.winteraccess.id
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.PATOKEN }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: docker/Dockerfile
|
|
push: true
|
|
platforms: linux/amd64
|
|
tags: |
|
|
git.winteraccess.id/${{ gitea.repository }}:latest
|
|
|