Skip to content

Commit

Permalink
feat: test new release
Browse files Browse the repository at this point in the history
  • Loading branch information
radoslavirha committed Jan 3, 2024
1 parent 61f687b commit 4e7d8ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/manually-build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions:
pull-requests: write

jobs:
docker:
build-docker:
name: Build & Publish ${{ matrix.docker.name }} to Docker Hub
strategy:
matrix:
Expand Down
32 changes: 4 additions & 28 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,13 @@ jobs:
with:
command: manifest

docker:
trigger-docker:
name: Build & Publish ${{ matrix.docker.name }} to Docker Hub
strategy:
matrix:
docker:
- { name: Hiker's Book UI, target: ui-hikers-book, image: radoslavirha/hikers-book-ui-hikers-book }
- { name: Authentication API, target: api-authentication, image: radoslavirha/hikers-book-api-authentication }
- { name: GraphQL API, target: api-graphql, image: radoslavirha/hikers-book-api-graphql }
- { name: Stages API, target: api-stages, image: radoslavirha/hikers-book-api-stages }
- { name: Trips API, target: api-trips, image: radoslavirha/hikers-book-api-trips }
runs-on: ubuntu-latest
needs: release-please
if: needs.release-please.outputs.release
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
- name: Call Build & Publish to Docker Hub from Tag
uses: ./manually-build-docker.yml
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./infra/docker/Dockerfile
# platforms: linux/amd64,linux/arm64
push: true
tags: ${{ matrix.docker.image }}:${{ needs.release-please.outputs.version }},${{ matrix.docker.image }}:latest
target: ${{ matrix.docker.target }}
tag: ${{ needs.release-please.outputs.version }}
4 changes: 2 additions & 2 deletions infra/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.json .

# INSTALL PRODUCTION DEPENDENCIES
FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
RUN pnpm install --prod --frozen-lockfile

# BUILD EVERYTHING
FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile
RUN pnpm run -r build

# COPY PACKAGES
Expand Down

0 comments on commit 4e7d8ea

Please sign in to comment.