-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 1.74 KB
/
pack.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
54
55
name: Pack Docker Image
on:
push:
branch: [main]
jobs:
build:
name: Build and Pack Docker Image
runs-on: ubuntu-latest
steps:
- name: Guix cache
uses: actions/cache@v3
with:
path: ~/.cache/guix
# use a key that (almost) never matches
key: guix-cache-${{ github.sha }}
restore-keys: |
guix-cache-
# Cannot use a cache for /gnu/store, since restore fails
- name: Install Guix
uses: PromyLOPh/guix-install-action@v1
with:
pullAfterInstall: true
- name: Ensure no locale warning
run: test -z "$(guix --version 2>&1 >/dev/null)"
- name: Checkout repository
uses: actions/checkout@v3
- name: Build kmail-alias-bot
run: |
pwd
ls
guix build -f guix-package.scm
# Create a docker image
- name: Pack (Docker)
run: |
guix pack --format=docker --file=guix-package.scm --entry-point=bin/kmail-alias-bot --root=docker-image.tar.gz
- name: Load to Docker
run: |
docker load < docker-image.tar.gz
docker tag rust-kmail-alias-bot azaostro/kmail-alias-bot:unstable
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: azaostro/kmail-alias-bot
- name: Inspect
run: |
docker image inspect azaostro/kmail-alias-bot:unstable
- name: Push to Docker Hub
run: |
docker push azaostro/kmail-alias-bot:unstable