Fix antora content image to use nodejs 20 UBI and observe git ref #7
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-content | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
paths: | |
- "images/showroom-content/**" | |
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-content | |
tags: latest ${{ github.ref_name }} | |
context: images/showroom-content/ | |
containerfiles: | | |
./images/showroom-content/Dockerfile | |
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 }}" |