Skip to content

Publish and release openapi-explorer image #1

Publish and release openapi-explorer image

Publish and release openapi-explorer image #1

Workflow file for this run

name: Publish and release openapi-explorer image
on:
release:
types:
- created
jobs:
build_zip:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '16.9.1'
cache: 'yarn'
- name: Build
env:
version: ${{ github.ref_name }}
run: |
yarn install --dev
yarn build
zip -r openapi-explorer_${version}.zip public
- name: Release
uses: softprops/action-gh-release@v2
with:
files: openapi-explorer*.zip
build_image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ github.repository }}
tags: latest ${{ github.sha }}
dockerfiles: |
./Containerfile
- name: Push to ghcr.io
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}