-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.1 KB
/
publish-docker-image-nightly.yaml
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
37
38
39
40
41
42
43
44
45
name: Build & Publish Nightly Docker Image
on:
push:
branches:
- 'master'
env:
DOCKER_IMAGE: ghcr.io/${{ github.repository_owner }}/lurk-nightly
jobs:
publish-nightly-docker-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set Environment Variables
run: |
echo "SHORT_COMMIT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Build and Push Docker Image
uses: docker/build-push-action@v3
with:
context: .
push: true
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64/v8
tags: |
${{ env.DOCKER_IMAGE }}:${{ env.SHORT_COMMIT_SHA }},${{ env.DOCKER_IMAGE }}:latest