Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ambrosus/airdao-gov-user-verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill-K-1 committed Feb 26, 2024
2 parents 52bed6b + 3813e6e commit 9bfcc4b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
45 changes: 44 additions & 1 deletion .github/workflows/build_and_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build_and_publish_verifier:
needs: build_and_publish_db
needs: build_and_publish_binary
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -137,3 +137,46 @@ jobs:
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build_and_publish_mailer:
needs: build_and_publish_binary
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v3
id: meta
with:
images: ghcr.io/ambrosus/airdao-gov-user-mailer

- name: Build and push
uses: docker/build-push-action@v2
with:
file: Dockerfile_mailer
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

- name: Move cachee
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
10 changes: 10 additions & 0 deletions Dockerfile_mailer
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM debian:bullseye-slim

WORKDIR /app

COPY --from=ghcr.io/ambrosus/airdao-gov-user-binary:main /tmp/builder/target/release/airdao-gov-portal-mailer .
COPY --from=ghcr.io/ambrosus/airdao-gov-user-binary:main /tmp/builder/mailer /app/mailer

RUN apt-get update && apt-get install -y lsb-release ca-certificates libssl-dev && apt-get clean all

CMD ["./airdao-gov-portal-mailer"]

0 comments on commit 9bfcc4b

Please sign in to comment.