Skip to content

Commit

Permalink
Merge pull request GoogleContainerTools#760 from imjasonh/main-actions
Browse files Browse the repository at this point in the history
Run GitHub Actions on changes to main branch
  • Loading branch information
loosebazooka authored Jul 15, 2021
2 parents aee38ec + 1f6b6d7 commit 4e1ef5d
Show file tree
Hide file tree
Showing 24 changed files with 29 additions and 556 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/buildifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Buildifier

on:
pull_request:
branches: [ 'master' ]
branches: [ 'main' ]

jobs:

Expand Down
38 changes: 18 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
name: CI

on:
workflow_dispatch: # Allow manual runs.
pull_request:
branches: [ 'master' ]
branches: [ 'main' ]
push:
branches: [ 'master' ]
branches: [ 'main' ]

jobs:
ci:
name: CI
runs-on: ubuntu-latest

steps:
- uses: actions/setup-go@v2
with:
go-version: 1.15.x
- uses: actions/checkout@v2
- uses: bazelbuild/setup-bazelisk@v1
- name: Mount bazel cache
uses: actions/cache@v2
with:
path: "~/.cache/bazel"
key: bazel

- name: Build and test
run: |
eval $(go env)
# install bazelisk as bazel to install the appropriate bazel version
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.6.1/bazelisk-linux-${GOARCH} && chmod +x bazelisk-linux-${GOARCH} && mv bazelisk-linux-${GOARCH} $HOME/bin/bazel
CPU=k8
bazel clean --curses=no
bazel build --cpu=${CPU} --curses=no //package_manager:dpkg_parser.par
bazel build --cpu=${CPU} --curses=no //...
# Build all targets tagged with our architecture:
bazel build --cpu=${CPU} --curses=no $(bazel query 'attr("tags", "'${GOARCH}'", "//...")')
# Run all tests not tagged as "manual":
bazel test --cpu=${CPU} --curses=no --test_output=errors --test_timeout=900 //...
# Run all tests tagged with our architecture:
bazel test --cpu=${CPU} --curses=no --test_output=errors --test_timeout=900 $(bazel query 'attr("tags", "'${GOARCH}'", "//...")')
set -ex
bazel build --curses=no //package_manager:dpkg_parser.par
bazel build --curses=no //...
bazel test --curses=no --test_output=errors //...
# Ignore java8 and experimental targets, which might not pass.
# TODO: Fix or remove these exceptions.
targets=$(bazel query 'attr("tags", "'amd64'", "//...")' | grep -v java8 | grep -v experimental)
bazel build --curses=no ${targets}
bazel test --curses=no --test_output=errors ${targets}
4 changes: 2 additions & 2 deletions .github/workflows/pylint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Pylint

on:
pull_request:
branches: [ 'master' ]
branches: [ 'main' ]

jobs:

Expand All @@ -27,4 +27,4 @@ jobs:
- name: Run pylint
shell: bash
run: |
find . -name "*.py" | xargs pylint --disable=R,C
find . -name "*.py" | xargs pylint --disable=R,C
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# "Distroless" Docker Images

[![Build Status](https://travis-ci.org/GoogleContainerTools/distroless.svg?branch=master)](https://travis-ci.org/GoogleContainerTools/distroless)
[![CI Build Status](https://github.com/GoogleContainerTools/distroless/actions/workflows/ci.yaml/badge.svg)](https://github.com/GoogleContainerTools/distroless/actions/workflows/ci.yaml)

"Distroless" images contain only your application and its runtime dependencies.
They do not contain package managers, shells or any other programs you would expect to find in a standard Linux distribution.
Expand Down Expand Up @@ -71,7 +71,6 @@ Follow these steps to get started:
* [gcr.io/distroless/python2.7-debian10](experimental/python2.7/README.md)
* [gcr.io/distroless/python3-debian10](experimental/python3/README.md)
* [gcr.io/distroless/java/jetty-debian10](java/jetty/README.md)
* [gcr.io/distroless/dotnet](experimental/dotnet/README.md)
* Write a multi-stage docker file.
Note: This requires Docker 17.05 or higher.

Expand Down Expand Up @@ -105,7 +104,6 @@ You can find other examples here:
* [Python 3](examples/python3/Dockerfile)
* [Golang](examples/go/Dockerfile)
* [Node.js](examples/nodejs/Dockerfile)
* [dotnet](examples/dotnet/Dockerfile)
* [Rust](examples/rust/Dockerfile)

To run any example, go to the directory for the language and run
Expand Down Expand Up @@ -142,7 +140,6 @@ See here for:
* [Python 3](examples/python3/BUILD)
* [Golang](examples/go/BUILD)
* [Node.js](examples/nodejs/BUILD)
* [dotnet](examples/dotnet/BUILD)

See here for examples on how to complete some common tasks in your image:

Expand Down
32 changes: 0 additions & 32 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -213,38 +213,6 @@ http_archive(
urls = ["https://nodejs.org/dist/v14.17.2/node-v14.17.2-linux-arm64.tar.gz"],
)

http_archive(
name = "dotnet",
build_file = "//experimental/dotnet:BUILD.dotnet",
sha256 = "69ecad24bce4f2132e0db616b49e2c35487d13e3c379dabc3ec860662467b714",
type = "tar.gz",
urls = ["https://download.microsoft.com/download/5/F/0/5F0362BD-7D0A-4A9D-9BF9-022C6B15B04D/dotnet-runtime-2.0.0-linux-x64.tar.gz"],
)

http_archive(
name = "dotnet_core_aspnet",
build_file = "//experimental/dotnet:BUILD.dotnet",
sha256 = "823f8ea555fd56ab40d56d423748036204c4540c08baa61de4462978a0c35583",
type = "tar.gz",
urls = ["https://download.visualstudio.microsoft.com/download/pr/f7c8f82a-8c47-497d-875b-2ac210599ec5/e8aea0c195efed8a9aff2ba687db8c26/aspnetcore-runtime-3.1.8-linux-x64.tar.gz"],
)

http_archive(
name = "dotnet_core_runtime",
build_file = "//experimental/dotnet:BUILD.dotnet",
sha256 = "c50800e02cea23609ec6a009b1fbfe6b1f7ec4634c54bee089f918fca8fe2323",
type = "tar.gz",
urls = ["https://download.visualstudio.microsoft.com/download/pr/e4e47a0a-132e-416a-b8eb-f3373ad189d9/43af4412e27696c3c16e50f496f6c7af/dotnet-runtime-3.1.8-linux-x64.tar.gz"],
)

http_archive(
name = "dotnet_core_sdk",
build_file = "//experimental/dotnet:BUILD.dotnet",
sha256 = "2b6b172f9483e499141e37a6b932a547d9476bf03f3e71a0fefb76c52e01a9ee",
type = "tar.gz",
urls = ["https://download.visualstudio.microsoft.com/download/pr/f01e3d97-c1c3-4635-bc77-0c893be36820/6ec6acabc22468c6cc68b61625b14a7d/dotnet-sdk-3.1.402-linux-x64.tar.gz"],
)

# For the debug image
http_file(
name = "busybox_amd64",
Expand Down
30 changes: 0 additions & 30 deletions examples/dotnet/BUILD

This file was deleted.

11 changes: 0 additions & 11 deletions examples/dotnet/Dockerfile

This file was deleted.

17 changes: 0 additions & 17 deletions examples/dotnet/Dockerfile.dotnet_core

This file was deleted.

12 changes: 0 additions & 12 deletions examples/dotnet/Hello.cs

This file was deleted.

23 changes: 0 additions & 23 deletions examples/dotnet/bin/Release/netcoreapp2.0/hello.deps.json

This file was deleted.

Binary file removed examples/dotnet/bin/Release/netcoreapp2.0/hello.dll
Binary file not shown.
Binary file removed examples/dotnet/bin/Release/netcoreapp2.0/hello.pdb
Binary file not shown.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions examples/dotnet/hello.csproj

This file was deleted.

8 changes: 0 additions & 8 deletions examples/dotnet/testdata/hello_core_aspnet_debian10.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions examples/dotnet/testdata/hello_core_runtime_debian10.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions examples/dotnet/testdata/hello_core_sdk_debian10.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions examples/dotnet/testdata/hello_debian10.yaml

This file was deleted.

81 changes: 0 additions & 81 deletions experimental/dotnet/BUILD

This file was deleted.

Loading

0 comments on commit 4e1ef5d

Please sign in to comment.