build: Testing with indoc 2.0.4 due to GitHub build issues #20
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: Build & Publish | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- 'v*' | |
env: | |
BUILDX_NO_DEFAULT_ATTESTATIONS: 1 | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install ShellCheck | |
run: | | |
sudo apt-get update | |
sudo apt-get install shellcheck | |
shellcheck --version | |
- name: Run Tests | |
run: make test | |
- name: Install QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Install Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Registry (ghcr.io) | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: ghcr.io | |
- name: Build Docker (main branch) | |
if: ${{ github.ref_name == 'main' }} | |
run: make build-docker | |
- name: Build Docker (tagged version) | |
if: ${{ github.ref_name != 'main' }} | |
run: make "VERSION=${{ github.ref_name }}" build-docker |