-
-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (44 loc) · 1.3 KB
/
generate_bin.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build Binaries
on:
push:
jobs:
build:
name: Build Container
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: roxedus
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
version: latest
driver-opts: image=moby/buildkit:master
- name: Build and push
uses: docker/build-push-action@v5
with:
file: ./Dockerfile
load: true
cache-from: ghcr.io/roxedus/pgloader:cache
cache-to: ghcr.io/roxedus/pgloader:cache
tags: |
ghcr.io/roxedus/pgloader
ghcr.io/roxedus/pgloader:ec8f41d
- name: Grab binary
run: |
mkdir bin
docker create --name pgloader ghcr.io/roxedus/pgloader
docker cp pgloader:/usr/local/bin/pgloader bin/pgloader
- name: Push image
run: |
docker push ghcr.io/roxedus/pgloader
- uses: ncipollo/release-action@v1
with:
tag: "ec8f41d"
artifacts: "bin/pgloader"
token: ${{ secrets.GITHUB_TOKEN }}