docs: update README.md #54
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: Build Image | |
on: | |
push: | |
branches: | |
- main | |
- feat/github-actions-build-image | |
jobs: | |
duplicate_guard: | |
runs-on: self-hosted | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
concurrent_skipping: "never" | |
skip_after_successful_duplicate: "true" | |
paths_ignore: '["**/README.md", "**/docs/**"]' | |
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' | |
docker-build: | |
needs: duplicate_guard | |
if: ${{ needs.duplicate_guard.outputs.should_skip != 'true' }} | |
runs-on: self-hosted | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Set up Java for Gradle | |
run: | | |
sudo apt update -y | |
sudo apt install openjdk-17-jdk -y | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: techeer-f5 | |
password: ${{ secrets.GH_TOKEN }} | |
- name: Build and push images & upload to ECR | |
id: build_images | |
run: | | |
./gradlew bootBuildImage | |
docker tag jmt-monster-backend:latest ghcr.io/techeer-f5/jmt-monster-backend:latest | |
docker push ghcr.io/techeer-f5/jmt-monster-backend:latest |