Skip to content

Commit 3abeb57

Browse files
committed
split up build and push so we can test in between
1 parent c9b6a3c commit 3abeb57

File tree

1 file changed

+6
-48
lines changed

1 file changed

+6
-48
lines changed

.github/workflows/docker.yml

Lines changed: 6 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -56,59 +56,17 @@ jobs:
5656
with:
5757
project: bsbhgkfhgc
5858
context: .
59-
file: ./docker/manyfold.dockerfile
59+
file: ./docker/${{ matrix.variant }}.dockerfile
6060
platforms: linux/amd64,linux/arm64
61-
push: ${{ github.event_name != 'pull_request' }}
61+
push: true
6262
tags: ${{ steps.docker_meta.outputs.tags }}
6363
labels: ${{ steps.docker_meta.outputs.labels }}
6464
build-args: |
6565
APP_VERSION=${{ steps.docker_meta.outputs.version }}
6666
GIT_SHA=${{ github.sha }}
6767
DOCKER_TAG=${{ steps.docker_meta.outputs.tags }}
6868
69-
solo:
70-
runs-on: ubuntu-latest
71-
permissions:
72-
contents: read # for checkout
73-
id-token: write # for OIDC token, used for Depot
74-
packages: write # to upload build to GHCR
75-
steps:
76-
- name: Check out code
77-
uses: actions/checkout@v5
78-
79-
- name: Work out Docker tags
80-
id: docker_meta
81-
uses: docker/metadata-action@v5
82-
with:
83-
images: ghcr.io/${{ github.repository }}-solo
84-
tags: |
85-
type=raw,value=${{ inputs.tag }},event=workflow_dispatch
86-
type=schedule,pattern=nightly
87-
type=semver,pattern={{version}}
88-
type=ref,event=pr
89-
type=edge
90-
91-
- name: Depot setup
92-
uses: depot/setup-action@v1
93-
94-
- name: Login to GitHub Container Registry
95-
uses: docker/login-action@v3
96-
with:
97-
registry: ghcr.io
98-
username: ${{ github.repository_owner }}
99-
password: ${{ secrets.GITHUB_TOKEN }}
100-
101-
- name: Build and push
102-
id: depot
103-
uses: depot/build-push-action@v1
104-
with:
105-
project: bsbhgkfhgc
106-
context: .
107-
file: ./docker/solo.dockerfile
108-
platforms: linux/amd64,linux/arm64
109-
push: ${{ github.event_name != 'pull_request' }}
110-
tags: ${{ steps.docker_meta.outputs.tags }}
111-
labels: ${{ steps.docker_meta.outputs.labels }}
112-
build-args: |
113-
APP_VERSION=${{ steps.docker_meta.outputs.version }}
114-
GIT_SHA=${{ github.sha }}
69+
- name: Smoke test
70+
run: docker run ${{ steps.docker_meta.outputs.tags }} bin/rails r "Manyfold::Application.initialized?"
71+
env:
72+
RAILS_ENV: production

0 commit comments

Comments
 (0)