Build and publish #59
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 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 }} |