Skip to content

Bump follow-redirects from 1.15.3 to 1.15.4 in /Kemkas.Web/frontend #2

Bump follow-redirects from 1.15.3 to 1.15.4 in /Kemkas.Web/frontend

Bump follow-redirects from 1.15.3 to 1.15.4 in /Kemkas.Web/frontend #2

Workflow file for this run

name: CI compile & test & build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
ci-fe:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Cache NPM packages
uses: actions/cache@v3
with:
key: npm-${{ hashFiles('./Kemkas.Web/frontend/yarn.lock') }}
path: |
./Kemkas.Web/frontend/node_modules
restore-keys: |
npm-${{ hashFiles('./Kemkas.Web/frontend/yarn.lock') }}
npm-
- name: Yarn Install
run: |
cd ./Kemkas.Web/frontend
yarn install --frozen-lockfiles
- name: Yarn Test
run: |
cd ./Kemkas.Web/frontend
./compile-less.sh
yarn build
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DO_ACCESS_TOKEN }}
- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 1200
- uses: docker/build-push-action@v5
with:
context: .
file: Kemkas.Web/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
load: true
tags: kemkas/kemkas:edge
- name: Tag container image
run: |
docker tag kemkas/kemkas:edge registry.digitalocean.com/kemkas/kemkas:${GITHUB_SHA::8}
- name: Push image to Container Registry
run: |
docker push registry.digitalocean.com/kemkas/kemkas:${GITHUB_SHA::8}
deploy:
runs-on: ubuntu-latest
needs:
- ci-fe
- docker-build
if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged ) }}
steps:
- uses: actions/checkout@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DO_ACCESS_TOKEN }}
- name: Log in to DigitalOcean Container Registry with short-lived credentials
run: doctl registry login --expiry-seconds 1200
- name: Tag container image with latest tag
run: |
docker pull registry.digitalocean.com/kemkas/kemkas:${GITHUB_SHA::8}
docker tag registry.digitalocean.com/kemkas/kemkas:${GITHUB_SHA::8} registry.digitalocean.com/kemkas/kemkas:latest
- name: Push image to Container Registry
run: |
docker push registry.digitalocean.com/kemkas/kemkas:latest
- name: Get container image ID of the images just pushed
run: |
docker images registry.digitalocean.com/kemkas/kemkas:${GITHUB_SHA::8} --format "{{.ID}}"
export DOCKER_IMAGE_ID=$(docker images registry.digitalocean.com/kemkas/kemkas:${GITHUB_SHA::8} --format "{{.ID}}")
export DOCKER_IMAGE_ID=DO-$DOCKER_IMAGE_ID
echo "DOCKER_IMAGE_ID=$DOCKER_IMAGE_ID" >> $GITHUB_ENV
- name: Tag commit
uses: tvdias/[email protected]
with:
repo-token: "${{ github.token }}"
tag: "${{ env.DOCKER_IMAGE_ID }}"