Merge pull request #64 from josemotta/dev #91
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CDGitops | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
name: Build | |
runs-on: [self-hosted, linux, ARM64] | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: ${{ secrets.DOCKER_USERNAME }}/boot-back:${{ github.sha }}, ${{ secrets.DOCKER_USERNAME }}/boot-back:latest | |
platforms: linux/arm64 | |
# - name: Setup Kustomize | |
# uses: imranismail/setup-kustomize@v1 | |
# with: | |
# kustomize-version: "3.6.1" | |
# - name: Update Kubernetes resources | |
# env: | |
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
# run: | | |
# cd k8s | |
# kustomize edit set image goserver=$DOCKER_USERNAME/boot-back:$GITHUB_SHA | |
# - name: Commit | |
# run: | | |
# git config --local user.email "[email protected]" | |
# git config --local user.name "GitHub Action" | |
# git commit -am "Bump docker version" | |
# - name: Push | |
# uses: ad-m/github-push-action@master | |
# with: | |
# github_token: ${{ secrets.DOCKER_PASSWORD }} | |
# repository: ${{ secrets.DOCKER_USERNAME }}/boot-back |