Skip to content

Commit

Permalink
chore(actions): change manifests path (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-lx authored Sep 27, 2021
1 parent ae1cc45 commit 4f72111
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: master
name: Merge master


on:
push:
branches: [ master ]
branches:
- master


jobs:
prepare:
Expand Down Expand Up @@ -68,7 +71,9 @@ jobs:
name: Dev Release
runs-on: ubuntu-20.04

needs: [ prepare, build ]
needs:
- prepare
- build

steps:
- name: Create Pre Release
Expand All @@ -78,7 +83,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
VERSION: ${{ needs.prepare.outputs.release }}
with:
tag_name: build/${{ env.VERSION }}/${{ env.BUILD }}
tag_name: ${{ env.VERSION }}.${{ env.BUILD }}
release_name: ${{ env.VERSION }}.${{ env.BUILD }}
body: ${{ github.event.head_commit.message }}
prerelease: true
Expand All @@ -90,7 +95,9 @@ jobs:
name: Draft Release
runs-on: ubuntu-20.04

needs: [ prepare, build ]
needs:
- prepare
- build

steps:
- name: Delete Previous drafts
Expand Down
26 changes: 12 additions & 14 deletions .github/workflows/prereleased.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
name: Prereleased


on:
release:
types: [ prereleased ]

env:
COMPONENT: aws/quota-provider
CONTAINER: ${{ secrets.DEPLOYMENT_CONTAINER }}
DEPLOYMENT_NAME: ${{ secrets.DEPLOYMENT_NAME }}
types:
- prereleased

GCLOUD_SDK_VERSION: '290.0.1'

CLUSTER: ${{ secrets.GOOGLE_CLUSTER_DEV }}
DOCKER_CONTAINER_REGISTRY: ${{ secrets.PRIVATE_CONTAINER_REGISTRY }}
env:
COMPONENT: aws-quota-provider
COMPONENT_PATH: distributions/aws/quota-provider/
DOCKER_IMAGE_URL: ${{ secrets.PRIVATE_CONTAINER_REGISTRY }}/${{ github.repository_owner }}/aws-quota-provider
PROJECT: ${{ secrets.GOOGLE_PROJECT_ID_DEV }}
ZONE: ${{ secrets.GOOGLE_CLUSTER_DEV_ZONE }}


jobs:
build:
Expand All @@ -28,7 +24,7 @@ jobs:
steps:
- name: Version
id: version
run: echo ::set-output name=value::`echo ${{ github.ref }} | sed -n -E 's/refs\/tags\/build\/([0-9]+.[0-9]+.[0-9]+)\/([[:alnum:]])/\1.\2/p'`
run: echo ::set-output name=value::${GITHUB_REF#refs/*/}

- uses: actions/checkout@v2

Expand All @@ -51,11 +47,13 @@ jobs:
secrets: |
GIT_AUTH_TOKEN=${{ secrets.GHCR_TOKEN }}
update-manifests:
name: Update Manifests
runs-on: ubuntu-20.04

needs: build
needs:
- build

steps:
- name: Checkout Manifests repo
Expand All @@ -72,7 +70,7 @@ jobs:
env:
VERSION: ${{ needs.build.outputs.version }}
run: |
cd ydata/${COMPONENT}
cd ${COMPONENT_PATH}
kustomize edit set image ${{ secrets.KUSTOMIZE_PROVIDER_CONTAINER_IMAGE }}=${DOCKER_IMAGE_URL}:${VERSION}
- name: Commit and push image update into manifests repo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: pull request
name: Pull request


on:
pull_request:
branches: [ master ]
branches:
- master


jobs:
validate:
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/released.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: Release
name: Released


on:
release:
types: [ released ]
types:
- released


env:
COMPONENT: aws/quota-provider
DOCKER_CONTAINER_REGISTRY: ${{ secrets.PRIVATE_CONTAINER_REGISTRY }}
COMPONENT: aws-quota-provider
COMPONENT_PATH: distributions/aws/quota-provider/
DOCKER_IMAGE_URL: ${{ secrets.PRIVATE_CONTAINER_REGISTRY }}/${{ github.repository_owner }}/aws-quota-provider


jobs:
prepare:
name: Extract Version and Build number
Expand All @@ -21,7 +25,7 @@ jobs:
steps:
- name: Version
id: version
run: echo ::set-output name=value::`echo ${{ github.ref }} | sed -n -E 's/refs\/tags\/([0-9]+.[0-9]+.[0-9]+)/\1/p'`
run: echo ::set-output name=value::${GITHUB_REF#refs/*/}

- uses: actions/checkout@v2

Expand All @@ -34,13 +38,14 @@ jobs:
name: Docker Tag and Push
runs-on: ubuntu-20.04

needs: prepare
needs:
- prepare

steps:
- name: Login to GitHub docker
uses: docker/login-action@v1
with:
registry: ${{ env.DOCKER_CONTAINER_REGISTRY }}
registry: ${{ secrets.PRIVATE_CONTAINER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}

Expand All @@ -58,7 +63,9 @@ jobs:
name: Update Manifests
runs-on: ubuntu-20.04

needs: [ prepare, docker ]
needs:
- prepare
- docker

steps:
- name: Checkout Manifests repo
Expand All @@ -75,7 +82,7 @@ jobs:
env:
VERSION: ${{ needs.prepare.outputs.version }}
run: |
cd ydata/${COMPONENT}
cd ${COMPONENT_PATH}
kustomize edit set image ${{ secrets.KUSTOMIZE_PROVIDER_CONTAINER_IMAGE }}=${DOCKER_IMAGE_URL}:${VERSION}
- name: Commit and push image update into manifests repo
Expand Down

0 comments on commit 4f72111

Please sign in to comment.