Skip to content

chore(channels): alpha to 1.2.302, beta to 1.2.301 #216

chore(channels): alpha to 1.2.302, beta to 1.2.301

chore(channels): alpha to 1.2.302, beta to 1.2.301 #216

name: release:trdl-publish
on:
push:
branches:
- main
paths:
- trdl_channels.yaml
repository_dispatch:
types: ["release:trdl-publish"]
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
publish:
name: Publish release channels using trdl server
runs-on: ubuntu-22.04
steps:
- name: Publish
uses: werf/trdl-vault-actions/publish@main
with:
vault-addr: ${{ secrets.TRDL_VAULT_ADDR }}
project-name: werf
vault-auth-method: approle
vault-role-id: ${{ secrets.TRDL_VAULT_ROLE_ID }}
vault-secret-id: ${{ secrets.TRDL_VAULT_SECRET_ID }}
deploy_channels_cm_prod:
name: Deploy trdl_channels.yaml to production
needs: publish
runs-on: ubuntu-latest-4-cores
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Converge
uses: werf/actions/converge@v1.2
with:
env: production
kube-config-base64-data: ${{ secrets.KUBECONFIG_BASE64_PROD }}
env:
WERF_NAMESPACE: "werfio-production"
WERF_DIR: "ci"
publish_werf_images:
name: Publish images with werf by trdl group and channel
strategy:
matrix:
dest-registry:
- ghcr.io
- registry-write.werf.io
needs: publish
runs-on: ubuntu-latest-16-cores
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install werf
uses: werf/actions/install@v1.2
with:
channel: alpha
- if: matrix.dest-registry == 'registry-write.werf.io'
name: Login to werf registry
uses: docker/login-action@v2
with:
registry: registry-write.werf.io
username: ${{ secrets.WERF_REGISTRY_USERNAME }}
password: ${{ secrets.WERF_REGISTRY_PASSWORD }}
- name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.WERF_IN_IMAGE_REPO_LOGIN }}
password: ${{ secrets.WERF_IN_IMAGE_REPO_PASSWORD }}
- name: Build and publish werf images
run: |
./scripts/werf-in-image/build-and-publish.sh ${{ matrix.dest-registry }}
notify:
if: always()
needs:
- publish
- deploy_channels_cm_prod
- publish_werf_images
uses: ./.github/workflows/_notification.yml
secrets:
mentionGroupID: ${{ secrets.SLACK_MENTION_GROUP_ID }}
webhook: ${{ secrets.SLACK_WEBHOOK }}