Skip to content

k3s4 minio op

k3s4 minio op #96

Workflow file for this run

name: ansible-k3s-docker-image
on:
push:
branches:
- master
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Harbor
uses: docker/login-action@v3
with:
registry: harbor.k3s0.ujstor.com
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Install yq
run: |
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
- name: Run docker tag sh and export var from config.yml
env:
HARBOR_PASSWORD: ${{ secrets.HARBOR_PASSWORD }}
HARBOR_USERNAME: ${{ secrets.HARBOR_USERNAME }}
run: |
chmod +x ./docker_tag.sh
./docker_tag.sh
- name: Export env variables
uses: cardinalby/export-env-action@v2
with:
envFile: '.env'
- name: Build and push
if: ${{ env.PUSH_TO_HARBOR == 'true' }}
uses: docker/build-push-action@v5
with:
context: ./iac/ansible/k3s-deploy
push: true
tags: ${{ env.HARBOR_URL }}/${{ env.HARBOR_PROJECT }}/${{ env.HARBOR_REPO }}:${{ env.NEW_TAG }}