Repository navigation
56 lines (49 loc) · 1.67 KB
/
Copy pathdocker-dev.yml
File metadata and controls
56 lines (49 loc) · 1.67 KB
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
46
47
48
49
50
51
52
53
54
55
56
name: Build Dev Docker Image
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.workflow }}-${{ inputs.git_ref }}
on:
workflow_dispatch:
inputs:
git_ref:
description: "Name of the branch or commit SHA to build."
required: true
type: string
jobs:
build-and-push-docker-image:
name: Build image and push to GHCR
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.git_ref }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- name: Login to Github Packages
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Meta fat for PRs only
id: metafat
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
images: ghcr.io/chainsafe/forest
flavor: |
latest=false
tags: |
type=raw,value={{date 'YYYY-MM-DD'}}-{{sha}}-fat
- name: Build fat image and push to GitHub Container Registry
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
file: ./Dockerfile
tags: ${{ steps.metafat.outputs.tags }}
labels: ${{ steps.metafat.outputs.labels }}
push: true
platforms: "linux/amd64"
target: fat-image