ci: deploy releases to test environment (#1916)

This commit is contained in:
Travis Groth 2021-02-19 10:40:20 -05:00 committed by GitHub
parent 5d60cff21e
commit 3c84004c1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 24 deletions

View file

@ -63,27 +63,3 @@ jobs:
org.opencontainers.image.created=${{ steps.metadata.outputs.timestamp }}
org.opencontainers.image.name=${{ steps.metadata.outputs.name }}
org.opencontainers.image.revision=${{ github.sha }}
deploy:
runs-on: ubuntu-latest
needs: publish
steps:
- name: Checkout Helmfile Repo
uses: actions/checkout@v2
with:
repository: pomerium/helmfile
token: ${{ secrets.APPARITOR_GITHUB_TOKEN }}
- name: Bump test environment
uses: mikefarah/yq@v4.5.1
with:
cmd: yq eval '.image.tag = "${{ needs.publish.outputs.sha-tag }}"' -i environments/internal-prd/values/pomerium-demo.yaml
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: master
commit_message: |
Bump test environment ${{ needs.publish.outputs.image }}
Image tag: ${{ needs.publish.outputs.sha-tag }}
Source Repo: ${{ github.repository }}@${{ github.sha }}

View file

@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
outputs:
tag: ${{ steps.tagName.outputs.tag }}
steps:
- name: Checkout
uses: actions/checkout@v2
@ -89,3 +91,27 @@ jobs:
docker tag gcr.io/pomerium-io/pomerium:${{ steps.tagName.outputs.tag }}-cloudrun gcr.io/pomerium-io/pomerium:latest-cloudrun
docker push gcr.io/pomerium-io/pomerium:latest-cloudrun
deploy:
runs-on: ubuntu-latest
needs: goreleaser
steps:
- name: Checkout Helmfile Repo
uses: actions/checkout@v2
with:
repository: pomerium/helmfile
token: ${{ secrets.APPARITOR_GITHUB_TOKEN }}
- name: Bump test environment
uses: mikefarah/yq@v4.5.1
with:
cmd: yq eval '.image.tag = "${{ needs.goreleaser.outputs.tag }}"' -i environments/internal-prd/values/pomerium-demo.yaml
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: master
commit_message: |
Bump test environment pomerium/pomerium
Image tag: ${{ needs.goreleaser.outputs.tag }}
Source Repo: ${{ github.repository }}@${{ github.sha }}