Merge pull request #3 from kincl/jkincl-add-novnc #1
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
--- | |
name: build-image-novnc | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
paths: | |
- "images/showroom-novnc/**" | |
permissions: | |
packages: write | |
concurrency: | |
group: build | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: set datetime | |
run: | | |
echo "datetime=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV | |
- name: Build image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: showroom-novnc | |
tags: latest ${{ github.ref_name }} | |
context: images/showroom-novnc/ | |
containerfiles: | | |
./images/showroom-novnc/Containerfile | |
build-args: | | |
CREATED_AT=${{ env.datetime }} | |
GITHUB_SHA=${{ github.sha }} | |
- name: push image to ghcr.io | |
id: push-to-ghcr | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: ghcr.io/rhpds | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Print image url | |
run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.registry-paths }}" |