-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.18 KB
/
tools-docker-image.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
46
47
48
49
50
51
env:
REGISTRY: ghcr.io
jobs:
build:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.BRANCH_NAME }}
- name: Generate Timestamp
run: |
echo "TIMESTAMP=$(date '+%s')" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
- name: Build and Push image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
tags: '${{ env.REGISTRY }}/agoric/tools-app:${{ env.TIMESTAMP }}'
build-args: |
TAG=${{ env.TIMESTAMP }}
name: Create Tools Docker Image
on:
workflow_dispatch:
inputs:
BRANCH_NAME:
default: main
description: Branch to build the image from
required: true