Merge pull request #106 from hwakabh/deps/certifi #33
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: Publish | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build_and_ship: | |
name: Build & Ship OCI image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# https://github.com/docker/login-action#github-container-registry | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Generate requirements.txt for Google Cloud buildpacks | |
run: | | |
poetry export -o requirements.txt --without-hashes | |
- name: Install pack | |
uses: buildpacks/github-actions/setup-pack@v5.7.2 | |
# https://github.com/buildpacks/github-actions#setup-pack-cli-action | |
- name: Publish packages | |
run: | | |
pack build ghcr.io/hwakabh/random-travelers:latest \ | |
--builder gcr.io/buildpacks/builder:latest \ | |
--path . \ | |
--env "$(cat .python-version)" \ | |
--publish |