Fix the response on non-text alias #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |