Files
webstudio/.github/workflows/cli-docker.yaml
T
Ivan Starkov 5396f429c9 build: Mini.staging (#3179)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-04-16 17:34:10 +03:00

68 lines
1.8 KiB
YAML

name: CLI Docker
on:
push:
branches:
- "*.staging"
# cancel in-progress runs on new commits to same PR (gitub.event.number)
concurrency:
group: vercel-deploy-${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
statuses: write # This is required for the GitHub Script createCommitStatus to work
packages: write
jobs:
build:
environment:
name: "staging"
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# username: ${{ secrets.DOCKERHUB_USER }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# To be able to pull image by branh name, sha, short sha and tag
# i.e. olegisonen/webstudio:hello.staging
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# TODO: create team someday on dockerhub
images: |
ghcr.io/webstudio-is/webstudio
tags: |
type=sha,format=long
type=sha,format=short
type=ref,event=branch
type=ref,event=tag
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./devops/cli/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}