From e39be808a7329f6de1ef854f463d663d7c66e395 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Tue, 7 Mar 2023 23:35:43 +0100 Subject: [PATCH] feat: add github action --- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..324e16f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: release +on: + pull_request: + push: + branches: + - "main" +env: + CARGO_TERM_COLOR: always + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + _EXPERIMENTAL_DAGGER_CACHE_CONFIG: type=gha;mode=max +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Update rust toolchain + run: rustup update stable && rustup default stable + - name: Set up cargo cache + uses: actions/cache@v3 + continue-on-error: false + with: + path: "~/.cargo/bin/\n~/.cargo/registry/index/\n~/.cargo/registry/cache/\n~/.cargo/git/db/\ntarget/" + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2.0.0 + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Run dagger [CI] + run: cargo run -p ci