Skip to content

Commit

Permalink
Multi-platform image
Browse files Browse the repository at this point in the history
  • Loading branch information
vicziani committed Dec 10, 2022
1 parent b7cb7bb commit bbe8735
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/lws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,25 @@ jobs:
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Get version
run: |
VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout )
echo "::set-output name=version::$VERSION"
id: get_version
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/lwsapp:latest
Expand All @@ -50,14 +53,18 @@ jobs:
aws-access-key-id: ${{ secrets.ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }}
aws-region: "eu-central-1"
if: ${{ false }}
- name: Upload package to S3 bucket
run: aws s3 cp target/lwsapp.jar s3://learnwebservices-deploy/lwsapp-${{ steps.get_version.outputs.version }}-${{github.run_number}}.jar
if: ${{ false }}
- name: Create new ElasticBeanstalk Application Version
run: |
aws elasticbeanstalk create-application-version \
--application-name learnwebservices \
--source-bundle S3Bucket="learnwebservices-deploy",S3Key="lwsapp-${{ steps.get_version.outputs.version }}-${{github.run_number}}.jar" \
--version-label "ver-${{ steps.get_version.outputs.version }}-${{github.run_number}}" \
--description "commit-sha-${{ github.sha }}"
if: ${{ false }}
- name: Deploy new ElasticBeanstalk Application Version
run: aws elasticbeanstalk update-environment --environment-name Learnwebservices-env --version-label "ver-${{ steps.get_version.outputs.version }}-${{github.run_number}}"
if: ${{ false }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [2.0.1]

- Multi-platform image (`linux/amd64`, `linux/arm64`)

## [2.0.0]

- Move to Amazon Web Services
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>learnwebservices</groupId>
<artifactId>lwsapp</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<packaging>jar</packaging>

<parent>
Expand Down

0 comments on commit bbe8735

Please sign in to comment.