Skip to content

Push container images #15

Push container images

Push container images #15

Workflow file for this run

# Copyright 2022 The Cross-Media Measurement Authors
#
# 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: "Push container images"
# See https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions
on:
release:
types: [published]
workflow_dispatch:
jobs:
push-images:
runs-on: ubuntu-22.04
steps:
- name: Check out revision
uses: actions/checkout@v4
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Export IMAGE_TAG
env:
DEFAULT_BRANCH: main
run: ./.github/workflows/export-image-tag.sh
- name: Push Bazel image
run: >
bazel run //bazel:push_bazel_image
--define=container_registry=ghcr.io
--define=image_repo_prefix=$GITHUB_REPOSITORY_OWNER
--define=image_tag=$IMAGE_TAG