First try to make raw images work again #79
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: backend-base | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'backend/base/**' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run tests | |
run: echo "To-Do Add Running Tests" | |
build-amd64: | |
needs: test | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Build and push (AMD64) | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./backend/base | |
platforms: linux/amd64 | |
push: true | |
tags: reallibrephotos/librephotos-base:dev-amd64 | |
build-arm64: | |
needs: test | |
runs-on: ubuntu-24.04-arm # Use ARM64 runner | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Build and push (ARM64) | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./backend/base | |
platforms: linux/arm64 | |
push: true | |
tags: reallibrephotos/librephotos-base:dev-arm64 | |
combine-manifest: | |
needs: [build-amd64, build-arm64] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Enable Docker CLI experimental features | |
run: echo '{"experimental":"enabled"}' > ~/.docker/config.json | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Create and push multi-arch manifest | |
run: | | |
docker manifest create reallibrephotos/librephotos-base:dev \ | |
reallibrephotos/librephotos-base:dev-amd64 \ | |
reallibrephotos/librephotos-base:dev-arm64 | |
docker manifest annotate reallibrephotos/librephotos-base:dev \ | |
reallibrephotos/librephotos-base:dev-amd64 --arch amd64 | |
docker manifest annotate reallibrephotos/librephotos-base:dev \ | |
reallibrephotos/librephotos-base:dev-arm64 --arch arm64 | |
docker manifest push reallibrephotos/librephotos-base:dev |