Skip to content

Commit

Permalink
chore: update github actions packages (#26)
Browse files Browse the repository at this point in the history
* chore: update github actions packages

* chore: rename action workflows
  • Loading branch information
tericcabrel authored Apr 3, 2024
1 parent 2ea7134 commit 738b8c3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/deploy-blog-in-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: Build the blog image and deploy
name: Build Prod Image

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
Expand All @@ -18,24 +22,24 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,enable=true,priority=100,prefix=,suffix=,format=long
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
build-args: |
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/deploy-blog-in-stage.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Build the blog image and deploy in the stage environment
name: Build Staging Image

on:
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
Expand All @@ -15,25 +19,25 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,enable=true,priority=100,prefix=,suffix=,format=long
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
build-args: |
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@
"*.+(js|jsx|ts|tsx|json|css|md|mdx)": [
"prettier --write"
]
}
},
"packageManager": "[email protected]"
}

0 comments on commit 738b8c3

Please sign in to comment.