Skip to content

Merge pull request #63 from danesjenovdan/main #64

Merge pull request #63 from danesjenovdan/main

Merge pull request #63 from danesjenovdan/main #64

Workflow file for this run

name: Build and publish Docker image
on:
push:
branches:
- 'k8s'
jobs:
push_to_registry:
name: Build and push Docker image to registry
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Scaleway
uses: docker/login-action@v2
with:
registry: rg.fr-par.scw.cloud/djnd
username: nologin
password: ${{ secrets.SCW_SECRET_TOKEN }}
- name: Build and push novdan frontend
uses: docker/build-push-action@v3
with:
context: ./novdan_frontend
push: true
tags: |
rg.fr-par.scw.cloud/djnd/novdan-frontend:${{ github.sha }}
rg.fr-par.scw.cloud/djnd/novdan-frontend:latest
- name: Build and push novdan api
uses: docker/build-push-action@v3
with:
context: ./novdan_api
push: true
tags: |
rg.fr-par.scw.cloud/djnd/novdan-api:${{ github.sha }}
rg.fr-par.scw.cloud/djnd/novdan-api:latest
- name: Update image versions in kustomize/kustomization.yaml
run: |
sed -i "s/newTag: .*\+/newTag\: '${{ github.sha }}'/" kustomize/kustomization.yaml
- name: Commit and push new image versions
uses: EndBug/add-and-commit@v9
with:
add: '.'
message: 'Update image versions in kustomize/kustomization.yaml'