Publish Docker image #26
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
############################################################################### | |
# _ _ _ _ _____ _ | |
# | | | | | | | | | __ \(_) | |
# | | ___ | |__ _ __ | |_| |__ ___ | |__) |_ _ __ _ __ ___ _ __ | |
# _ | |/ _ \| '_ \| '_ \ | __| '_ \ / _ \ | _ /| | '_ \| '_ \ / _ \ '__| | |
# | |__| | (_) | | | | | | | | |_| | | | __/ | | \ \| | |_) | |_) | __/ | | |
# \____/ \___/|_| |_|_| |_| \__|_| |_|\___| |_| \_\_| .__/| .__/ \___|_| | |
# | | | | | |
# |_| |_| | |
# | |
# Copyright (c) 2021-2023 Claudio André <claudioandre.br at gmail.com> | |
# | |
# This program comes with ABSOLUTELY NO WARRANTY; express or implied. | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, as expressed in version 2, seen at | |
# http://www.gnu.org/licenses/gpl-2.0.html | |
############################################################################### | |
name: Publish Docker image | |
on: | |
push: | |
branches: [ images ] | |
workflow_dispatch: | |
env: | |
REPO: ghcr.io/${{ github.repository_owner }}/john-ci | |
jobs: | |
push_to_registry: | |
name: Push Docker image to a registry | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
matrix: | |
include: | |
#- image-tag: fedora.latest | |
# dockerfile: Dockerfile.FLatest | |
#- image-tag: fedora.flatpak | |
# dockerfile: Dockerfile.flatpak.package | |
#- image-tag: ubuntu.opencl | |
# dockerfile: Dockerfile.OpenCL | |
#- image-tag: ubuntu.devel | |
# dockerfile: Dockerfile.UbuntuDevel | |
#- image-tag: ubuntu.rolling | |
# dockerfile: Dockerfile.UbuntuRolling | |
- image-tag: redhat.ubi8 | |
dockerfile: Dockerfile.RHUbi8 | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Log in to GitHub Docker Registry | |
uses: docker/#-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build container image | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
file: ../../tests/Dockerfiles/${{ matrix.dockerfile }} | |
tags: | | |
${{ env.REPO }}:${{ matrix.image-tag }} | |
${{ env.REPO }}:${{ matrix.image-tag }}J${{ github.run_number }} |