Skip to content

Commit

Permalink
latest on release + manual deployment (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoArregui authored Apr 29, 2024
1 parent 403ce93 commit 034ff88
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/docker-release.tml
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
34 changes: 34 additions & 0 deletions .github/workflows/manual-deploy.yml
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 }}

0 comments on commit 034ff88

Please sign in to comment.