Added usage to the readme #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |