Typo in Dockerfile setting env variable for models location #9
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 ptp image | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'main' | |
- 'develop' | |
- 'v*.*.*' | |
tags: | |
- 'v*.*.*' | |
paths: | |
- 'ptp/**' | |
pull_request: | |
branches: | |
- 'main' | |
- 'develop' | |
- 'v*.*.*' | |
paths: | |
- 'ptp/**' | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
build-ptp: | |
runs-on: ubuntu-latest | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
#DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
#DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
working-directory: ./ptp | |
ingress-working-directory: ./ingress | |
steps: | |
- uses: actions/checkout@v3 | |
# https://github.com/docker/setup-qemu-action | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
# https://github.com/docker/setup-buildx-action | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
#- name: docker login | |
# run: | | |
# docker login ${{ env.REGISTRY }} -u ${{ github.actor }} -p ${{ secrets.GH_TOKEN }} | |
- name: Login to GHCR | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
#username: ${{ github.actor }} | |
#password: ${{ secrets.GH_TOKEN }} | |
- name: Docker meta | |
id: meta_ptp | |
uses: docker/metadata-action@v4 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=sha | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: ${{env.working-directory}} | |
platforms: linux/amd64,linux/arm64 | |
#,linux/arm/v8 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta_ptp.outputs.tags }} | |
labels: ${{ steps.meta_ptp.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max, size=5GB | |
#cache-from: type=registry,ref=ptp/ptp:buildcache | |
#cache-to: type=registry,ref=ptp/ptp:buildcache,mode=max |