From 7afdde08c1150634bf1e237b676f495017bab79c Mon Sep 17 00:00:00 2001 From: Sebastian Kunze Date: Mon, 13 Mar 2023 08:39:03 +0100 Subject: [PATCH] Remove container image workflows (#1242) --- .github/workflows/container-image-squid.yml | 30 --------- .../workflows/container-image-strongswan.yml | 30 --------- .github/workflows/container-image-toolbox.yml | 30 --------- .github/workflows/container-image.yml | 66 ------------------- 4 files changed, 156 deletions(-) delete mode 100644 .github/workflows/container-image-squid.yml delete mode 100644 .github/workflows/container-image-strongswan.yml delete mode 100644 .github/workflows/container-image-toolbox.yml delete mode 100644 .github/workflows/container-image.yml diff --git a/.github/workflows/container-image-squid.yml b/.github/workflows/container-image-squid.yml deleted file mode 100644 index f6b0050270..0000000000 --- a/.github/workflows/container-image-squid.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: "Build and push the Squid container image" - -on: - workflow_dispatch: - push: - branches: - - master - paths: - - 'modules/cloud-config-container/squid/docker/**' - -jobs: - build-push-squid-container-image: - uses: ./.github/workflows/container-image.yml - with: - image_name: fabric-squid - docker_context: modules/cloud-config-container/squid/docker diff --git a/.github/workflows/container-image-strongswan.yml b/.github/workflows/container-image-strongswan.yml deleted file mode 100644 index 1dc5d0eaaa..0000000000 --- a/.github/workflows/container-image-strongswan.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: "Build and push the strongSwan container image" - -on: - workflow_dispatch: - push: - branches: - - master - paths: - - 'modules/cloud-config-container/onprem/docker-images/strongswan/**' - -jobs: - build-push-strongswan-container-image: - uses: ./.github/workflows/container-image.yml - with: - image_name: fabric-strongswan - docker_context: modules/cloud-config-container/onprem/docker-images/strongswan diff --git a/.github/workflows/container-image-toolbox.yml b/.github/workflows/container-image-toolbox.yml deleted file mode 100644 index 37870fce36..0000000000 --- a/.github/workflows/container-image-toolbox.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: "Build and push the Toolbox container image" - -on: - workflow_dispatch: - push: - branches: - - master - paths: - - 'modules/cloud-config-container/onprem/docker-images/toolbox/**' - -jobs: - build-push-toolbox-container-image: - uses: ./.github/workflows/container-image.yml - with: - image_name: fabric-toolbox - docker_context: modules/cloud-config-container/onprem/docker-images/toolbox diff --git a/.github/workflows/container-image.yml b/.github/workflows/container-image.yml deleted file mode 100644 index 0485402525..0000000000 --- a/.github/workflows/container-image.yml +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: "Build and push a generic container image" - -on: - workflow_call: - inputs: - image_name: - required: true - type: string - docker_context: - required: true - type: string - -permissions: - packages: write - -env: - REGISTRY: ghcr.io - -jobs: - build-push-generic-container-image: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set image version - run: echo IMAGE_VERSION=$(date +'%Y%m%d') >> $GITHUB_ENV - - - name: Normalise image name - run: echo IMAGE_NAME=$(echo '${{ github.repository_owner }}/${{ inputs.image_name }}' | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV - - - name: Login to GHCR - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v3 - with: - context: ${{ inputs.docker_context }} - push: true - tags: | - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_VERSION }} - labels: | - org.opencontainers.image.licenses=Apache-2.0 - org.opencontainers.image.revision=${{ github.sha }} - org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} - org.opencontainers.image.title=${{ inputs.image_name }} - org.opencontainers.image.vendor=Google LLC - org.opencontainers.image.version=${{ env.IMAGE_VERSION }}