Skip to content

update the scm root in setup.py as well as pyproject.toml (#108) #43

update the scm root in setup.py as well as pyproject.toml (#108)

update the scm root in setup.py as well as pyproject.toml (#108) #43

Workflow file for this run

name: build
on:
push:
branches:
- main
tags:
- 'v*.*.*'
jobs:
publish-image:
runs-on: ubuntu-latest
if: github.repository == 'uarenforecasting/esprr'
outputs:
imgdigest: ${{ steps.build.outputs.digest }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: quay.io/uapowerforecasting/esprr
tag-sha: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Quay.io
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Build and push
id: build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
update-deployment:
runs-on: ubuntu-latest
if: github.repository == 'uarenforecasting/esprr'
needs:
- publish-image
steps:
- uses: actions/checkout@v2
with:
repository: uarenforecasting/esprr-deploy
token: ${{ secrets.DEPLOY_TOKEN }}
- uses: imranismail/setup-kustomize@v1
with:
kustomize-version: 3.8.7
- name: Set ref
id: sharef
run: |
echo "::set-output name=ref::$(echo ${GITHUB_SHA} | cut -b -12)"
- name: Make PR
run: |
git config user.name renserver
git config user.email [email protected]
git checkout -b deploy/${REF}
cd overlays/development
kustomize edit set image ${IMG}@${DIGEST}
git add kustomization.yaml
git commit -m 'Update '${IMG}' built from '${REF}
git push origin deploy/${REF}
gh pr create --fill
env:
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
REF: ${{ steps.sharef.outputs.ref }}
IMG: quay.io/uapowerforecasting/esprr
DIGEST: ${{ needs.publish-image.outputs.imgdigest }}