Skip to content

chore(deps): update docker-github-actions #1665

chore(deps): update docker-github-actions

chore(deps): update docker-github-actions #1665

Workflow file for this run

name: Build projects-bot
on:
push:
jobs:
format-lint-check:
name: "Format & lint check"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run format:check
- run: npm run lint
build:
name: "Build"
runs-on: ubuntu-latest
needs: ["format-lint-check"]
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
push: ${{ github.event_name != 'pull_request' && ( github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/projects-bot' ) }}
platforms: linux/amd64
file: Dockerfile
tags: |
ghcr.io/csesoc/projects-discord-bot:${{ github.sha }}
ghcr.io/csesoc/projects-discord-bot:latest
labels: ${{ steps.meta.outputs.labels }}
deploy:
name: Deploy (CD)
runs-on: ubuntu-latest
needs: [build]
if: ${{ github.event_name != 'pull_request' && ( github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/projects-bot' ) }}
concurrency: production
environment:
name: production (projects-bot)
steps:
- name: Dispatch deployment
uses: devsoc-unsw/deployment-dispatch-action@main
with:
deployment-dispatcher-app-id: ${{ vars.DEPLOYMENT_DISPATCHER_APP_ID }}
deployment-dispatcher-app-private-key: ${{ secrets.DEPLOYMENT_DISPATCHER_APP_PRIVATE_KEY }}
owner: csesoc
repository: deployment
ref: develop
updates: |
ghcr.io/csesoc/projects-discord-bot=${{ github.sha }}