Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing cache docker build #189

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,20 @@ jobs:
shell: bash
working-directory: ${{ inputs.check_docs_directory }}

- name: Build DockerFile
- name: Set up Docker Buildx
if: inputs.check_dockerfile
run: |
docker build -f ${{ inputs.check_dockerfile }} .
working-directory: ${{ inputs.working_directory }}
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
if: inputs.check_dockerfile
with:
context: ${{ inputs.working_directory }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{github.repository_owner}}/github:${{ github.head_ref }}
file: ${{ inputs.working_directory }}/${{ inputs.check_dockerfile }}

- name: Start services
uses: ./.github/actions/services
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
use_bandit: false
use_autoflake: true

run_codeql: true
run_codeql: false

requirements_path: .github/test/python_test/requirements.txt
packages_path: .github/test/python_test/packages.txt
Expand Down
17 changes: 13 additions & 4 deletions workflows/_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,20 @@ jobs:
shell: bash
working-directory: ${{ inputs.check_docs_directory }}

- name: Build DockerFile
- name: Set up Docker Buildx
if: inputs.check_dockerfile
run: |
docker build -f ${{ inputs.check_dockerfile }} .
working-directory: ${{ inputs.working_directory }}
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
if: inputs.check_dockerfile
with:
context: ${{ inputs.working_directory }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{github.repository_owner}}/github:${{ github.head_ref }}
file: ${{ inputs.working_directory }}/${{ inputs.check_dockerfile }}

- name: Start services
uses: ./.github/actions/services
Expand Down
2 changes: 1 addition & 1 deletion workflows/pull_request_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
use_bandit: false
use_autoflake: true

run_codeql: true
run_codeql: false

requirements_path: .github/test/python_test/requirements.txt
packages_path: .github/test/python_test/packages.txt
Expand Down
Loading