Merge pull request #79 from josemotta/dev #106
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
# The Tofu Raspberry Pi is used as self-hosted runner that deploys & manages to execute jobs from GitHub Actions. | |
# https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners | |
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: | |
file: Dockerfile.prod | |
push: true | |
tags: ${{ secrets.DOCKER_USERNAME }}/boot-back:${{ github.sha }}, ${{ secrets.DOCKER_USERNAME }}/boot-back:latest | |
platforms: linux/arm64 |