Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lmilbaum committed Nov 8, 2023
1 parent ea1590e commit 9a3a106
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 20 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build-and-push-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build-and-push-image

on:
push:
branches:
- main

pull_request:
branches:
- main

workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: centos/centos-boot-dev

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Login to GitHub Container Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: ./eln-dev
file: ./eln-dev/Containerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
labels: ${{ steps.meta.outputs.labels }}
18 changes: 0 additions & 18 deletions .github/workflows/docker-image.yml

This file was deleted.

3 changes: 1 addition & 2 deletions eln-dev/Containerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM quay.io/centos-boot/fedora-boot:eln
# FROM registry.gitlab.com/centos/cloud/sagano/fedora-boot-tier-1:eln
FROM quay.io/centos-boot/fedora-tier-1:eln
COPY *.repo /etc/yum.repos.d/
RUN dnf --disablerepo='*' --enablerepo=copr-coreos-continuous --enablerepo=copr-rhcontainerbot-bootc -y distro-sync && \
dnf clean all && rm -rf /var/* && \
Expand Down

0 comments on commit 9a3a106

Please sign in to comment.