fix: sh to bash : #32 #23
Workflow file for this run
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
on: | |
push: | |
branches: | |
- "feature/gke-deploy" | |
defaults: | |
run: | |
working-directory: ./ | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Corretto openJDK 17 | |
uses: actions/setup-java@v3 # check specific version in https://github.com/actions/setup-java | |
with: | |
distribution: 'corretto' | |
java-version: '17' | |
- name: Gradle caching | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build and test project | |
run: ./gradlew build | |
# - name: Set up QEMU | |
# uses: docker/setup-qemu-action@v3 | |
# | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v3 | |
- name: Build docker image and push | |
run: bash ./script/img_push_multi_arch.sh -u ${{ secrets.DOCKERHUB_USERNAME }} -t ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Configure google cloud credentials | |
id: auth | |
uses: google-github-actions/auth@v2 | |
with: | |
credentials_json: ${{ secrets.GCP_SA_KEY }} | |
- name: Set up gcloud cli | |
uses: google-github-actions/setup-gcloud@v2 | |
- name: Set GKE cluster context | |
uses: google-github-actions/get-gke-credentials@v2 | |
with: | |
cluster_name: ${{ secrets.GKE_CLUSTER }} | |
location: ${{ secrets.GKE_ZONE }} | |
- name: Deploy to GKE | |
run: | | |
kubectl apply -f ./kubernetes/volume | |
kubectl apply -f ./kubernetes/ingress | |
kubectl apply -f ./kubernetes/service | |
kubectl apply -f ./kubernetes/deploy |