-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
latest on release + manual deployment (#115)
- Loading branch information
1 parent
403ce93
commit 034ff88
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Publish 'latest' image | ||
|
||
on: | ||
release: | ||
types: | ||
- "created" | ||
|
||
jobs: | ||
quay-build-push: | ||
runs-on: windows-2019 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_TOKEN }} | ||
|
||
- name: Mark published image as latest | ||
run: | | ||
COMMIT_HASH=${{ github.event.inputs.commit_hash }} | ||
docker pull quay.io/decentraland/lods-generator:${COMMIT_HASH} | ||
docker tag quay.io/decentraland/lods-generator:${COMMIT_HASH} quay.io/decentraland/lods-generator:latest | ||
docker push quay.io/decentraland/lods-generator:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Manual deployment | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
deployment-environment: | ||
required: true | ||
type: choice | ||
options: | ||
- prd | ||
- dev | ||
default: prd | ||
description: Environment | ||
tag: | ||
required: true | ||
default: "latest" | ||
type: string | ||
description: "Docker tag (quay.io)" | ||
|
||
jobs: | ||
deployment: | ||
if: ${{ inputs.deployment-environment }} | ||
name: "Deploy to: ${{ inputs.deployment-environment }}" | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.deployment-environment }} | ||
steps: | ||
- name: Trigger deployment | ||
id: deploy | ||
uses: decentraland/dcl-deploy-action@main | ||
with: | ||
dockerImage: "quay.io/decentraland/lods-generator:${{ inputs.tag }}" | ||
serviceName: "lods-generator" | ||
env: ${{ inputs.deployment-environment }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |