Commit 48d29991 authored by Gary van Woerkens's avatar Gary van Woerkens
Browse files

Add Hasura image registration.

parent 0a19b292
......@@ -49,10 +49,10 @@ jobs:
path: .next
##############################################################################
## BUILD AND REGISTER DOCKER IMAGES
## BUILD AND REGISTER APPLICATION IMAGE
##############################################################################
register:
name: Build & Register images
name: Build & Register application
runs-on: ubuntu-latest
needs: build
steps:
......@@ -112,6 +112,70 @@ jobs:
tags: "${{ steps.docker_meta.outputs.tags }}"
labels: "${{ steps.docker_meta.outputs.labels }}"
##############################################################################
## BUILD AND REGISTER HASURA IMAGE
##############################################################################
register-hasura:
name: Build & Register Hasura
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Get project name
run: |
echo "project=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
# - name: Download application build
# uses: actions/download-artifact@v2
# with:
# name: next
# path: ./.next
# - run: |
# ls -lah
# ls -lah ./.next
- name: Create image labels and tags
id: docker_meta
uses: "crazy-max/ghaction-docker-meta@2e1a5c7fa42123697f82d479b551a1bbdb1bef88"
with:
images: ghcr.io/socialgouv/fabrique/hasura
labels: |
org.opencontainers.image.title=hasura
org.opencontainers.image.documentation=https://github.com/SocialGouv/${{ env.project }}/tree/${{ github.sha }}
tags: |
type=sha
type=ref,event=pr
type=ref,event=branch
type=semver,pattern={{version}}
type=raw,value=sha-${{ github.sha }}
type=semver,pattern={{major}}.{{minor}}
- name: Set up Buildx
id: buildx
uses: docker/setup-buildx-action@master
with:
install: true
- name: Registry authentication
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.SOCIALGROOVYBOT_NAME }}
password: ${{ secrets.SOCIALGROOVYBOT_GHCR_PAT }}
- name: Image build and register
uses: docker/build-push-action@v2
with:
push: 'true'
context: packages/hasura
builder: ${{ steps.buildx.outputs.name }}
tags: "${{ steps.docker_meta.outputs.tags }}"
labels: "${{ steps.docker_meta.outputs.labels }}"
##############################################################################
## GENERATE KUBERNETES MANIFESTS
##############################################################################
......@@ -159,7 +223,7 @@ jobs:
deploy:
name: Deploy application
runs-on: ubuntu-latest
needs: [register, manifests]
needs: [register, register-hasura, manifests]
steps:
- name: Checkout repository
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment