-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.35 KB
/
build-and-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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: $(yq e '.appVersion' charts/swr-cache-proxy/Chart.yaml)
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 github-actions@github.com
- 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 }}