forked from InfiniTimeOrg/InfiniTime
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 846 Bytes
/
docker.yml
File metadata and controls
36 lines (30 loc) · 846 Bytes
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
35
36
name: Build & Push Docker image (GHCR)
on:
push:
branches:
- main
- guardian-beacon
paths:
- 'Dockerfile'
- '.github/workflows/docker.yml'
workflow_dispatch: {}
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare lowercase owner
id: prep
run: |
echo "owner_lc=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_OUTPUT
- name: Login to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
- name: Build & Push (GHCR)
run: |
IMAGE="ghcr.io/${{ steps.prep.outputs.owner_lc }}/guardian-beacon:latest"
docker build -t "$IMAGE" .
docker push "$IMAGE"