Merge pull request #124 from hwakabh/release-please--branches--main #56
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: Publish | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
IMAGE_NAME: ghcr.io/${{ github.repository }} | |
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }} | |
jobs: | |
build_and_ship: | |
name: Build & Ship OCI image | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# https://github.com/docker/login-action#github-container-registry | |
- name: Build and push Docker images | |
uses: iloveitaly/github-action-nixpacks@main | |
with: | |
push: true | |
tags: ${{ env.IMAGE_NAME }}:latest | |
- name: Deploy app to Railway | |
run: | | |
curl -fsSL https://railway.com/install.sh | sh | |
RAILWAY_TOKEN=${{ env.RAILWAY_TOKEN }} railway up --service random-travelers --ci |