Skip to content

Images

Images #101

Workflow file for this run

# Authors:
# Unai Martinez-Corral
#
# Copyright 2021-2022 Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0
name: Images
on:
push:
paths:
- '.github/workflows/Images.yml'
- 'gource/containers/**'
schedule:
- cron: '0 0 * * 4'
workflow_dispatch:
env:
DOCKER_BUILDKIT: 1
jobs:
Gource:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build container images
run: |
docker build -t ghcr.io/umarcor/gource -< gource/containers/Dockerfile
docker build -t ghcr.io/umarcor/gource/xrun gource/containers -f- <<EOF
FROM ghcr.io/umarcor/gource
COPY run.sh /run.sh
COPY xrun.sh /xrun.sh
CMD ['/xrun.sh']
EOF
- name: Login to ghcr.io
uses: docker/login-action@v1
with:
registry: ghcr.io
username: gha
password: ${{ github.token }}
- name: Push container images to registry
run: for image in gource gource/xrun; do docker push ghcr.io/umarcor/"$image"; done