-
Notifications
You must be signed in to change notification settings - Fork 2
GitHub registry #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: propUi
Are you sure you want to change the base?
Changes from all commits
f7eccf9
e719e74
1e8cc31
015cf89
82985be
d2ccc0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,43 @@ | ||
| # This workflow will build the Container and push a corresponding Docker image to Dockerhub | ||
| name: Push docker image to Dockerhub | ||
| # This workflow will build the Container and push a corresponding Docker image to the GitHub registry | ||
| name: Push docker image to the GitHub registry | ||
|
|
||
| on: | ||
| push: | ||
| branches: propUi | ||
| tags: | ||
| - "v*.*.*" | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| REGISTRY: ghcr.io | ||
| IMAGE_NAME: ${{ github.repository }} | ||
|
|
||
| jobs: | ||
| multi: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| uses: actions/checkout@v3 | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v1 | ||
| - name: Set output | ||
| id: vars | ||
| run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | ||
| uses: docker/setup-qemu-action@v2 | ||
| - name: Extract metadata (tags, labels) for Docker | ||
| id: meta | ||
| uses: docker/metadata-action@v4 | ||
| with: | ||
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v1 | ||
| - name: Login to DockerHub | ||
| uses: docker/login-action@v1 | ||
| uses: docker/setup-buildx-action@v2 | ||
| - name: Login to the GitHub registry | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | ||
|
|
||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push latest Container | ||
| if: ${{ steps.vars.outputs.tag == 'propUi' }} | ||
| uses: docker/build-push-action@v2 | ||
| uses: docker/build-push-action@v4 | ||
| with: | ||
| context: . | ||
| platforms: linux/amd64 #,linux/arm64 | ||
| push: true | ||
| tags: opentosca/bowie:latest | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,9 @@ | |
| FROM node:12.7-alpine AS build | ||
| WORKDIR /usr/src/app | ||
| COPY package.json package-lock.json ./ | ||
| RUN apk add --no-cache python2 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need additional dependencies just because we change the registry?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is a fix to be able to build it on the arm64 architecture. I can't remember why it was necessary, because that commit is almost a year old. |
||
| RUN apk add --no-cache make | ||
| RUN apk add --no-cache g++ | ||
| RUN npm install | ||
| COPY . . | ||
| RUN npm run build | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea what goes wrong for ARM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my machine building for arm64 works, but in the GitHub action it hangs. Maybe their emulation has some problems.