This commit is contained in:
37
.github/workflows/deploy.yml
vendored
37
.github/workflows/deploy.yml
vendored
@@ -14,8 +14,19 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Install mise
|
||||||
uses: docker/setup-buildx-action@v2
|
run: |
|
||||||
|
curl -sSL https://mise.run | sh
|
||||||
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||||
|
echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- name: Install railpack
|
||||||
|
run: mise install ubi:railwayapp/railpack@latest
|
||||||
|
|
||||||
|
- name: Start BuildKit
|
||||||
|
run: |
|
||||||
|
docker run --rm --privileged -d --name buildkit moby/buildkit
|
||||||
|
echo "BUILDKIT_HOST=docker-container://buildkit" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Login to Container Registry
|
- name: Login to Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
@@ -24,12 +35,16 @@ jobs:
|
|||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.DEPLOY_TOKEN }}
|
password: ${{ secrets.DEPLOY_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build with RailPack
|
||||||
uses: docker/build-push-action@v4
|
run: |
|
||||||
with:
|
# Build image using RailPack
|
||||||
context: .
|
railpack build . --tag ${{ github.event.repository.name }}:latest
|
||||||
platforms: linux/amd64
|
|
||||||
push: true
|
# Tag image
|
||||||
tags: |
|
docker tag ${{ github.event.repository.name }}:latest ${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
||||||
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
docker tag ${{ github.event.repository.name }}:latest ${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
||||||
${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
|
||||||
|
- name: Push to Registry
|
||||||
|
run: |
|
||||||
|
docker push ${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
|
||||||
|
docker push ${{ secrets.REPO_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user