Skip to content

Commit

Permalink
Upgrade Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
me-julian committed May 10, 2024
1 parent 55ef45e commit 84e5329
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ jobs:
format: 'YYYY-MM-DD-HH-mm-ss'

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

- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: Set up pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
# Upload the EB app package as an artifact
- name: Upload EB app artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: eb-app-package
path: './elastic-beanstalk/package/games-not-played.zip'
Expand All @@ -108,7 +108,7 @@ jobs:
# Upload Database Migrations
- name: Upload migrations package as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: migrations
path: './packages/api/db/migrations.zip'
Expand All @@ -117,11 +117,11 @@ jobs:
# Apparently this needs to stay before AWS auth
- name: Install buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

# Configure AWS credentials
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::173624809884:role/GithubActionsAutomator
aws-region: us-east-2
Expand All @@ -130,7 +130,7 @@ jobs:
# Login to AWS ECR
- name: Login to AWS ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
uses: aws-actions/amazon-ecr-login@v2
with:
registries: '173624809884'
mask-password: 'true'
Expand All @@ -147,7 +147,7 @@ jobs:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: games-not-played-api
IMAGE_TAG: ${{ steps.get-time.outputs.time }}
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./packages/api
platforms: linux/arm64
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ jobs:
# Download app package to upload to EB
# eb-app-package.zip extracts to games-not-played.zip
- name: Download EB package artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: eb-app-package

- name: Download migrations artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: migrations

# Configure AWS Credentials
- name: Configure AWS Credentials
id: get-aws-creds
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v4
with:
unset-current-credentials: true
role-to-assume: arn:aws:iam::173624809884:role/GithubActionsAutomator
Expand All @@ -44,16 +44,16 @@ jobs:
# Login to AWS ECR
- name: Login to AWS ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
uses: aws-actions/amazon-ecr-login@v2
with:
registries: '173624809884'
mask-password: 'true'

# Install Node for running Sequelize migrations
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: Install sequelize and sequelize-cli
run: npm install sequelize sequelize-cli mysql2
Expand All @@ -73,7 +73,7 @@ jobs:
# Deploy app to EB
- name: Deploy app to EB
uses: einaregilsson/beanstalk-deploy@v21
uses: einaregilsson/beanstalk-deploy@v22
with:
aws_access_key: ${{ steps.get-aws-creds.outputs.aws-access-key-id }}
aws_secret_key: ${{ steps.get-aws-creds.outputs.aws-secret-access-key }}
Expand Down

0 comments on commit 84e5329

Please sign in to comment.