-
Notifications
You must be signed in to change notification settings - Fork 3
Docker Workflow update #75
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
Changes from all commits
d992892
e981995
1ec4bb2
b6d6d04
6d88ac7
5fce86a
8fe8d30
ee1b058
048e98c
d572109
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 |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ name: Build and Publish Frontend Docker Image | |
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| tags: [ "v*.*.*" ] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
|
|
@@ -21,23 +21,28 @@ jobs: | |
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Extract version from package.json | ||
| id: get_version | ||
| run: echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Extract Docker metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ghcr.io/eosc-data-commons/matchmaker-frontend | ||
| tags: | | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }} | ||
|
|
||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v5 | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| platforms: linux/amd64,linux/arm64 | ||
| push: true | ||
| tags: | | ||
| ghcr.io/eosc-data-commons/matchmaker-frontend:latest | ||
| ghcr.io/eosc-data-commons/matchmaker-frontend:${{ steps.get_version.outputs.version }} | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
|
Comment on lines
+31
to
+48
|
||
Uh oh!
There was an error while loading. Please reload this page.