Bump webpack from 5.93.0 to 5.94.0 #219
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
name: Pull Request | |
on: | |
pull_request_target: | |
types: | |
- opened | |
- ready_for_review | |
- synchronize | |
- reopened | |
branches: | |
- develop | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'LuisAlejandro/movie-box' | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Restoring node_modules cache | |
uses: actions/cache@v4 | |
with: | |
path: 'node_modules' | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} | |
- name: Login to Github Docker Registry | |
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u $GITHUB_ACTOR --password-stdin | |
- name: Pulling docker cache | |
run: | | |
GITHUB_REPOSITORY=$(echo $GITHUB_REPOSITORY | tr '[A-Z]' '[a-z]') | |
docker pull docker.pkg.github.com/$GITHUB_REPOSITORY/moviebox-build-cache || true | |
- name: Building image with cache | |
run: | | |
GITHUB_REPOSITORY=$(echo $GITHUB_REPOSITORY | tr '[A-Z]' '[a-z]') | |
docker build . -t luisalejandro/movie-box:latest --cache-from=docker.pkg.github.com/$GITHUB_REPOSITORY/moviebox-build-cache | |
- name: Building project | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
GIST_ID: ${{ secrets.GIST_ID }} | |
TRAKT_ID: ${{ secrets.TRAKT_ID }} | |
TRAKT_USERNAME: ${{ secrets.TRAKT_USERNAME }} | |
MOVIE_BOX_MODE: ${{ secrets.MOVIE_BOX_MODE }} | |
run: | | |
echo "GH_TOKEN=${GH_TOKEN}" > .env | |
echo "GIST_ID=${GIST_ID}" >> .env | |
echo "TRAKT_ID=${TRAKT_ID}" >> .env | |
echo "TRAKT_USERNAME=${TRAKT_USERNAME}" >> .env | |
echo "MOVIE_BOX_MODE=${MOVIE_BOX_MODE}" >> .env | |
sudo chown -R 1000:1000 . | |
make dependencies update | |
sudo chown -R runner:docker . | |
- name: Pushing docker image | |
run: | | |
GITHUB_REPOSITORY=$(echo $GITHUB_REPOSITORY | tr '[A-Z]' '[a-z]') | |
docker tag luisalejandro/movie-box:latest docker.pkg.github.com/$GITHUB_REPOSITORY/moviebox-build-cache | |
docker push docker.pkg.github.com/$GITHUB_REPOSITORY/moviebox-build-cache || true | |
approve: | |
name: Approve pull request | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'LuisAlejandro/movie-box' | |
needs: build | |
steps: | |
- name: Approve | |
uses: hmarr/[email protected] | |
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' | |
with: | |
github-token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}" | |
- name: Approve | |
uses: hmarr/[email protected] | |
if: github.actor == 'LuisAlejandro' | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
merge: | |
name: Merge pull request | |
runs-on: ubuntu-22.04 | |
if: github.repository == 'LuisAlejandro/movie-box' | |
needs: approve | |
steps: | |
- name: Merge | |
uses: actions/github-script@v7 | |
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' | |
with: | |
github-token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}" | |
script: | | |
await github.rest.pulls.merge({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: context.payload.pull_request.number | |
}) | |
- name: Merge | |
uses: actions/github-script@v7 | |
if: github.actor == 'LuisAlejandro' | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
script: | | |
await github.rest.pulls.merge({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: context.payload.pull_request.number | |
}) |