Build Docker Container #8
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 Docker Container | |
on: [workflow_dispatch] | |
jobs: | |
build-and-publish: | |
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 -f requirements.txt --output requirements.txt | |
# - name: export requirements with poetry | |
# uses: divideprojects/[email protected] | |
# with: | |
# without-hashes: true | |
# outfile-name: requirements.txt | |
- name: debug | |
run: ls | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: build amd64 image | |
run: docker build -t ghcr.io/felix920506/jellychord:latest-amd64 --platform linux/amd64 . | |
- name: login to ghcr | |
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: push amd64 image | |
run: docker push ghcr.io/felix920506/jellychord:latest-amd64 | |
# - name: Build and push | |
# uses: docker/build-push-action@v6 | |
# with: | |
# push: true | |
# tags: ghcr.io/felix920506/jellychord:latest | |
# platforms: linux/amd64,linux/arm64,linux/arm/v7 |