Skip to content

Build Docker Container #14

Build Docker Container

Build Docker Container #14

name: Build Docker Container
on: [workflow_dispatch]
jobs:
generate-requirements-txt:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: install poetry
run: python3 -m pip install poetry
- name: install poetry dependencies
run: poetry install
- name: export requirements.txt
run: poetry export --without-hashes -f requirements.txt --output requirements.txt
- name: upload requirements.txt
uses: actions/upload-artifact@v3
with:
name: requirements
path: requirements.txt
build-and-publish-amd64:
runs-on: ubuntu-latest
needs: generate-requirements

Check failure on line 32 in .github/workflows/build-container.yml

View workflow run for this annotation

GitHub Actions / Build Docker Container

Invalid workflow file

The workflow is not valid. .github/workflows/build-container.yml (Line: 32, Col: 12): Job 'build-and-publish-amd64' depends on unknown job 'generate-requirements'. .github/workflows/build-container.yml (Line: 60, Col: 12): Job 'build-and-publish-arm64' depends on unknown job 'generate-requirements'.
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Download requirements.txt
uses: actions/download-artifact@v3
with:
name: requirements
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to ghcr
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build amd64 image
run: docker build -t ghcr.io/felix920506/jellychord:latest-amd64 --platform linux/amd64 .
- name: push amd64 image
run: docker push ghcr.io/felix920506/jellychord:latest-amd64
build-and-publish-arm64:
runs-on: ubuntu-24.04-arm
needs: generate-requirements
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Download requirements.txt
uses: actions/download-artifact@v3
with:
name: requirements
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to ghcr
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build arm64 image
run: docker build -t ghcr.io/felix920506/jellychord:latest-arm64 --platform linux/arm64 .
- name: push arm64 image
run: docker push ghcr.io/felix920506/jellychord:latest-arm64