From 94251351b0431f9b3bcaee1ff922dda278d60016 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Sun, 22 May 2022 07:46:54 +0100 Subject: [PATCH] handle container build correctly in PRs --- .github/workflows/code.yml | 8 ++++---- tests/test_credentials/.gphotos.token | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 9bf5f845..cab3e5fb 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -182,12 +182,14 @@ jobs: ${{ runner.os }}-buildx- - name: Login to Docker Hub + if: github.event_name != 'pull_request' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Log in to GitHub Docker Registry + if: github.event_name != 'pull_request' uses: docker/login-action@v1 with: registry: ghcr.io @@ -202,12 +204,10 @@ jobs: ghcr.io/${{ github.repository }} # github repo and dockerhub tag must match for this to work ${{ github.repository }} - # all pull requests share a single tag 'pr' tags: | type=ref,event=branch type=ref,event=tag - type=raw,value=latest,enable=${{ github.event_name != 'pull_request' }} - type=raw,value=pr + type=raw,value=latest # required for multi-arch build - name: Set up QEMU @@ -223,7 +223,7 @@ jobs: file: .devcontainer/Dockerfile context: . platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 - push: true + push: ${{ github.event_name != 'pull_request' }} build-args: BASE=python:3.10-slim tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/tests/test_credentials/.gphotos.token b/tests/test_credentials/.gphotos.token index 58852b71..0993c29a 100644 --- a/tests/test_credentials/.gphotos.token +++ b/tests/test_credentials/.gphotos.token @@ -1 +1 @@ -{"access_token": "ya29.a0ARrdaM-M6_B3tlQ89_ujmzYD59rRbD5HFUL-9PT13qjZaMAMG3GCoF6yjKJ3q5BZc6KYTgE_waVeprrYfKq0sUg9wYMLJK2QoIwJ5i7E0fyEqA7Jdi0Uj00UvZ8MN7yLulBGeORsQczEuWZqNMW4rwWzt2SqOg", "expires_in": 3599, "scope": ["https://www.googleapis.com/auth/photoslibrary.sharing", "https://www.googleapis.com/auth/photoslibrary.readonly"], "token_type": "Bearer", "expires_at": 1652904084.5309072, "refresh_token": "1//03CEqAzsnP-8PCgYIARAAGAMSNwF-L9Irz4_ilhRw0HIwVImT4gTCUPlV8YaCTYQiIjD4juWOI5eQh_-Rzh9nTmBND0jliOnabq4"} \ No newline at end of file +{"access_token": "ya29.a0ARrdaM-gnPDJz9yQsqsqSk9JuTjWOEmcHOhAaOK4kqaq-TvXKdyiq3poSywztKprh1LOVR_jzMUZzFN5WsHpT9tGS0NxNbf-JWaix3iqKEF5Y0vZhs6u9iEee-drUkoBpLVeIdNR70w-KDiWzDx73MSnU7RHCx4", "expires_in": 3599, "scope": ["https://www.googleapis.com/auth/photoslibrary.readonly", "https://www.googleapis.com/auth/photoslibrary.sharing"], "token_type": "Bearer", "expires_at": 1653085052.2558572, "refresh_token": "1//03CEqAzsnP-8PCgYIARAAGAMSNwF-L9Irz4_ilhRw0HIwVImT4gTCUPlV8YaCTYQiIjD4juWOI5eQh_-Rzh9nTmBND0jliOnabq4"} \ No newline at end of file