Container Image CI ubuntu22 #494
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ********************************************************************************************************************** # | |
# # | |
# ::: ::: ::: ::: ::: ::: ::::::::::: :::::::::: # | |
# containerdisk-ubuntu22.yml :+: :+: :+: :+: :+: :+: :+: :+: :+: # | |
# +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ # | |
# By: codespace <codespace@kalyte.ro> +#++:++ +#++:++#++: +#+ +#++: +#+ +#++:++# # | |
# +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ # | |
# Created: 2023/12/17 16:36:46 by codespace #+# #+# #+# #+# #+# #+# #+# #+# # | |
# Updated: 2023/12/17 16:36:47 by codespace ### ### ### ### ########## ### ### ##########.ro # | |
# # | |
# ********************************************************************************************************************** # | |
name: Container Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
release: | |
types: [published] | |
schedule: | |
- cron: "0 0 * * *" | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Login to Github Container Registory | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Container | |
id: meta | |
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Build and Push Container Images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./ubuntu22.Dockerfile | |
push: true | |
tags: ghcr.io/docheio/containerdisk-ubuntu:22 | |
labels: ${{ steps.meta.outputs.labels }} |