3_middlewares_1_koa_js #1
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: 3_middlewares_1_koa_js | ||
env: | ||
APP_NAME: middleware_koa_js | ||
PROJECT_DIR: 3_middlewares/1_koa_js | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- ${{ env.PROJECT_DIR }} | ||
Check failure on line 12 in .github/workflows/3_middlewares_1_koa_js.yml GitHub Actions / 3_middlewares_1_koa_jsInvalid workflow file
|
||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- id: lower-credentials | ||
name: Lower Credentials | ||
run: | | ||
echo "actor=${GITHUB_ACTOR@L}" >> $GITHUB_OUTPUT | ||
echo "repository=${GITHUB_REPOSITORY@L}" >> $GITHUB_OUTPUT | ||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ steps.lower-credentials.outputs.actor }} | ||
password: ${{ secrets.GHCR_PAT }} | ||
- name: Build Docker image | ||
run: | | ||
cd ${{ env.PROJECT_DIR }} && \ | ||
docker build -t ghcr.io/${{ steps.lower-credentials.outputs.repository }}/${{ env.APP_NAME }}:latest . | ||
- name: Push Docker image to GHCR | ||
run: | | ||
docker push ghcr.io/${{ steps.lower-credentials.outputs.repository }}/${{ env.APP_NAME }}:latest |