Skip to content

Remove warnings in Dockerfile #27

Remove warnings in Dockerfile

Remove warnings in Dockerfile #27

Workflow file for this run

name: LWS CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
# Temporary disable because of GitHub issue
#cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Login to Docker Hub
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@v2
- name: Get version
run: |
VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout )
echo "version=$VERSION" >> $GITHUB_OUTPUT
id: get_version
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/lwsapp:latest
${{ secrets.DOCKER_HUB_USERNAME }}/lwsapp:${{ steps.get_version.outputs.version }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
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 }}