diff --git a/.github/workflows/deploy-beta.yml b/.github/workflows/deploy-beta.yml deleted file mode 100644 index 7809860..0000000 --- a/.github/workflows/deploy-beta.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Deploy Beta - -env: - REGISTRY: ghcr.io - IMAGE_NAME: adofai-gg/frontend - -on: - push: - branches: - - 'beta' -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: true - - uses: docker/setup-buildx-action@v1 - id: buildx - with: - platforms: linux/amd64,linux/arm64 - - name: Login to container registry - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker image - uses: docker/build-push-action@v3 - with: - context: . - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:beta - push: true - cache-from: type=gha - cache-to: type=gha,mode=max - builder: ${{ steps.buildx.outputs.name }} - platforms: linux/amd64,linux/arm64 - build-args: | - API_ENDPOINT=${{ secrets.STAGING_API_ENDPOINT }} - OPENGRAPH_ENDPOINT=${{ secrets.STAGING_OPENGRAPH_ENDPOINT }} - DISCORD_INVITE=https://discord.gg/adofaigg - SUPPORT_MAIL=support@adofai.gg - GTM_ID=GTM-WDQRN9M - GA_ID=G-3BKXMVNJYQ - SENTRY_ENV=beta - SENTRY_ORG=${{ secrets.SENTRY_ORG }} - SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }} - SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_URL=${{ secrets.SENTRY_URL }} - SENTRY_DSN=${{ secrets.SENTRY_DSN }} diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/docker.yml similarity index 80% rename from .github/workflows/deploy-staging.yml rename to .github/workflows/docker.yml index 6fe8cb1..c78b51e 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/docker.yml @@ -1,13 +1,10 @@ -name: Deploy Staging - -env: - REGISTRY: ghcr.io - IMAGE_NAME: adofai-gg/frontend +name: Docker on: push: - branches: - - 'new-rewrite' + release: + types: + - published jobs: docker: runs-on: ubuntu-latest @@ -20,17 +17,24 @@ jobs: id: buildx with: platforms: linux/amd64,linux/arm64 + - name: Login to container registry uses: docker/login-action@v2 with: - registry: ${{ env.REGISTRY }} + registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: name/app - name: Build and push Docker image uses: docker/build-push-action@v3 with: context: . - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:staging + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.output.labels }} push: true builder: ${{ steps.buildx.outputs.name }} platforms: linux/amd64,linux/arm64