Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

de/formatting #863

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 15 additions & 28 deletions .github/workflows/docker.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,35 @@ jobs:
docker-build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/[email protected]
-
name: Docker meta
- name: Docker meta
id: docker_meta
uses: crazy-max/[email protected]
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=sha
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/[email protected]
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/[email protected]
-
name: Set up helmfile
- name: Set up helmfile
uses: helmfile/[email protected]
-
name: Cache Docker layers
- name: Cache Docker layers
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Login to GitHub Container Registry
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
- name: Build and push
uses: docker/[email protected]
with:
context: .
Expand All @@ -55,20 +47,17 @@ jobs:
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
push: true
-
name: Check out `wmde/wbaas-deploy` repository in staging child directory
- name: Check out `wmde/wbaas-deploy` repository in staging child directory
uses: actions/[email protected]
with:
repository: wmde/wbaas-deploy
path: ./repos/wbaas-deploy-staging
-
name: Check out `wmde/wbaas-deploy` repository in production child directory
- name: Check out `wmde/wbaas-deploy` repository in production child directory
uses: actions/[email protected]
with:
repository: wmde/wbaas-deploy
path: ./repos/wbaas-deploy-production
-
name: Update helmfile values for local, staging and production
- name: Update helmfile values for local, staging and production
id: update-helmfile-values
run: |
TAG="$(echo ${{ steps.docker_meta.outputs.tags }} | cut -d':' -f2)"
Expand All @@ -77,8 +66,7 @@ jobs:
sed -i "/image:/{n;s/tag:.*/tag: $TAG/;}" ./repos/wbaas-deploy-staging/k8s/helmfile/env/staging/ui.values.yaml.gotmpl
sed -i "/image:/{n;s/tag:.*/tag: $TAG/;}" ./repos/wbaas-deploy-production/k8s/helmfile/env/production/ui.values.yaml.gotmpl
# run the values script for local, prod and staging
-
name: Update argo values for local, staging and production
- name: Update argo values for local, staging and production
id: update-argo-values
run: |
cd ./repos/wbaas-deploy-staging
Expand All @@ -89,13 +77,12 @@ jobs:
# run generate values script for prod from prod folder
cd ../wbaas-deploy-production
./bin/generate-values production ui
-
name: Truncate commit message
- name: Truncate commit message
id: truncate-commit-message
run: |
MSG=$(git log -1 --pretty=format:%s)
echo "msg=$MSG" >> $GITHUB_OUTPUT
-
- name: Create Staging+Local Pull Request
uses: peter-evans/create-pull-request@v5
with:
path: ./repos/wbaas-deploy-staging
Expand All @@ -110,7 +97,7 @@ jobs:
This is an automated update for the `ui` image in staging and local, using `${{ steps.update-helmfile-values.outputs.tag }}`.

**Changes**: [${{ steps.truncate-commit-message.outputs.msg }}](https://github.com/wbstack/ui/commit/${{ github.sha }})
-
- name: Create Production Pull Request
uses: peter-evans/create-pull-request@v5
with:
path: ./repos/wbaas-deploy-production
Expand Down
Loading