Skip to content

Refactor cli code structure #32

Refactor cli code structure

Refactor cli code structure #32

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Docker Setup Buildx
uses: docker/[email protected]
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
if: github.event_name == 'pull_request'
with:
context: .
push: true
platforms: linux/amd64
tags: ghcr.io/${{ github.repository_owner }}/subway:${{ github.head_ref }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
if: github.ref == 'refs/heads/main'
with:
context: .
push: true
platforms: linux/amd64
tags: ghcr.io/${{ github.repository_owner }}/subway:latest