Merge pull request #3 from nirmalkumarsharma/main #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Turquoise Space - Open JDK 8 - Docker Image CI / CD | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
timeout-minutes: 2 | |
steps: | |
- | |
name: Get Current Date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M-%S-%Z')" | |
- | |
name: Checkout repository | |
uses: actions/checkout@v3 | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DockerHub_UserName }} | |
password: ${{ secrets.DockerHub_PassWord }} | |
logout: true | |
- | |
name: Build and push | |
id: docker_build_push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: | | |
turquoisespace/open-jdk-8:latest-jre-x64-alpine-linux-hotspot | |
turquoisespace/open-jdk-8:jdk8u382-ga-jre-x64-alpine-linux-hotspot | |
turquoisespace/open-jdk-8:jdk8u382-b05-jre-x64-alpine-linux-hotspot | |
turquoisespace/open-jdk-8:${{ steps.date.outputs.date }}_${{ github.sha }} | |
- | |
name: Image digest | |
run: echo ${{ steps.docker_build_push.outputs.digest }} |