Skip to content

[CI] Do not build containers on each commit #5061

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

Merged
merged 1 commit into from
Dec 1, 2021
Merged
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
18 changes: 2 additions & 16 deletions .github/workflows/sycl_containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
push:
branches:
- sycl
paths:
- 'devops/containers/**'

jobs:
base_image_ubuntu2004:
Expand All @@ -18,21 +20,13 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Check if dependencies have changed
id: deps_changed
shell: bash {0}
run: |
git diff --exit-code HEAD~1 -- devops/containers/ubuntu2004_base.Dockerfile
echo "::set-output name=flag::$?"
- name: Login to GitHub Container Registry
if: ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Container
if: ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
uses: docker/build-push-action@v2
with:
push: true
Expand All @@ -52,21 +46,13 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Check if dependencies have changed
id: deps_changed
shell: bash {0}
run: |
git diff --exit-code HEAD~1 -- devops/containers/ubuntu2004_intel_drivers.Dockerfile
echo "::set-output name=flag::$?"
- name: Login to GitHub Container Registry
if: ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Container
if: ${{ (github.event_name != 'push') || steps.deps_changed.outputs.flag}}
uses: docker/build-push-action@v2
with:
push: true
Expand Down