Skip to content

Build and publish

Build and publish #46

name: Build and publish
on:
workflow_run:
workflows: ["Lint and test"]
types:
- completed
jobs:
build-container:
name: Build container
runs-on: ubuntu-latest
env:
IMAGE_NAME: "vividplanet/swr-cache-proxy"
TAGS: "v1"
steps:
- run: echo "${{ github.actor }}"
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: |
git config user.name github-actions
git config user.email [email protected]
- name: Build
id: build_image
uses: redhat-actions/s2i-build@v2
with:
path_context: "."
builder_image: "registry.access.redhat.com/ubi8/nodejs-18"
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.TAGS }}
- name: Push To DockerHub
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: docker.io
username: vividplanetinfra
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}