-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 941 Bytes
/
deploy.yml
File metadata and controls
41 lines (33 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Deploy
on:
workflow_run:
workflows: ["CI/CD Pipeline"]
branches: [main]
types: [completed]
permissions:
contents: read
packages: write
concurrency:
group: deploy
cancel-in-progress: true
jobs:
build-and-push:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- name: Set lowercase repo
run: echo "REPO_LOWER=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: apps/web/Dockerfile
push: true
tags: ghcr.io/${{ env.REPO_LOWER }}/web:latest