From 2e334620987abe1223856fbdca8fdd64aabcfc36 Mon Sep 17 00:00:00 2001 From: Eric Cabrel TIOGO Date: Wed, 1 May 2024 22:42:16 +0200 Subject: [PATCH] Update the repository from the origin branch (#1) * feat: atempt on fixing permissions error while deploy on stage * feat: add dk as author * Update pythonbrad info (#23) * Correct pythonbrad name * Update pythonbrad.md * chore: update github actions packages (#26) * chore: update github actions packages * chore: rename action workflows * chore: rename action workflows (#27) --------- Co-authored-by: sanix-darker Co-authored-by: Brady Fomegne --- .github/workflows/deploy-blog-in-prod.yaml | 16 ++++++++++------ .github/workflows/deploy-blog-in-stage.yaml | 21 ++++++++++++--------- data/authors/pythonbrad.md | 4 +++- data/authors/sanix-darker.md | 8 ++++++++ package.json | 3 ++- 5 files changed, 35 insertions(+), 17 deletions(-) create mode 100644 data/authors/sanix-darker.md diff --git a/.github/workflows/deploy-blog-in-prod.yaml b/.github/workflows/deploy-blog-in-prod.yaml index e0785b5..f2f8b29 100644 --- a/.github/workflows/deploy-blog-in-prod.yaml +++ b/.github/workflows/deploy-blog-in-prod.yaml @@ -1,16 +1,20 @@ -name: Build the blog image and deploy +name: Build and Deploy 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 }} jobs: - build-and-push-prod: + build-and-push: runs-on: ubuntu-latest permissions: contents: read @@ -18,10 +22,10 @@ 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 }} @@ -29,13 +33,13 @@ jobs: - 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: | diff --git a/.github/workflows/deploy-blog-in-stage.yaml b/.github/workflows/deploy-blog-in-stage.yaml index 7416e9e..7a2ef65 100644 --- a/.github/workflows/deploy-blog-in-stage.yaml +++ b/.github/workflows/deploy-blog-in-stage.yaml @@ -1,26 +1,28 @@ -name: Build the blog image and deploy in the stage environment +name: Build and Deploy 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 }} jobs: - build-and-push-prod: + build-and-push: runs-on: ubuntu-latest - permissions: - contents: read - packages: write + permissions: write-all 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 }} @@ -28,13 +30,14 @@ jobs: - 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: | diff --git a/data/authors/pythonbrad.md b/data/authors/pythonbrad.md index 2439eaa..54c7280 100644 --- a/data/authors/pythonbrad.md +++ b/data/authors/pythonbrad.md @@ -1,5 +1,7 @@ --- -name: Python Brad +name: pythonbrad avatar: /static/images/authors/pythonbrad.jpg +occupation: OpenSource developer twitter: https://twitter.com/pythonbrad +github: https://github.com/pythonbrad --- diff --git a/data/authors/sanix-darker.md b/data/authors/sanix-darker.md new file mode 100644 index 0000000..a62c2c7 --- /dev/null +++ b/data/authors/sanix-darker.md @@ -0,0 +1,8 @@ +--- +name: Sanix Darker +avatar: /static/images/authors/avatar.png +occupation: Backend Engineer +email: s4nixd@gmail.com +twitter: https://twitter.com/sanixdarker +github: https://github.com/sanix-darker +--- diff --git a/package.json b/package.json index 2845a93..6a27db2 100644 --- a/package.json +++ b/package.json @@ -70,5 +70,6 @@ "*.+(js|jsx|ts|tsx|json|css|md|mdx)": [ "prettier --write" ] - } + }, + "packageManager": "yarn@1.22.22" }