-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (25 loc) · 990 Bytes
/
dev-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Local (Dev) Build & Push
# Pushes a new image to the dev registry on every push to the dev branch (or manually triggered on a branch)
# The local/dev image is for frontend development: It is the one uobtheatre-web pulls when running locally
on:
push:
branches: [dev]
workflow_dispatch:
env:
IMAGE_NAME: api-dev
IMAGE_OWNER: bristolsta
jobs:
build-dev:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build . --file compose/local/django/Dockerfile --tag ghcr.io/$IMAGE_OWNER/$IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
- name: Log into registry
# This is where you will update the PAT to GITHUB_TOKEN
run: echo "${{ secrets.BRISTOLSTA_REGISTRY_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push image
run: docker push ghcr.io/$IMAGE_OWNER/$IMAGE_NAME:latest