Skip to content

upgrade(build): bump elixir to 1.17.2 and beam to 27.0 #7

upgrade(build): bump elixir to 1.17.2 and beam to 27.0

upgrade(build): bump elixir to 1.17.2 and beam to 27.0 #7

Workflow file for this run

name: ci
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
IMAGE_REPO: registry.fly.io/elixir-phoenix-nix-docker-deployment
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ github.token }}
- uses: cachix/cachix-action@v15
with:
name: razielgn
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: run checks
run: nix flake check -L
- name: build and push docker image
if: ${{ github.ref == 'refs/heads/master' }}
run: |
nix run .#flyctl -- auth token | nix run .#skopeo -- login -u x --password-stdin registry.fly.io
eval "$(nix build --print-out-paths .#dockerImage)" \
| gzip --fast \
| nix run .#skopeo -- \
--insecure-policy \
copy \
docker-archive:/dev/stdin \
"docker://${{ env.IMAGE_REPO }}:${{ github.sha }}"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: deploy
if: ${{ github.ref == 'refs/heads/master' }}
run: |
nix run .#flyctl -- deploy -i "${{ env.IMAGE_REPO }}:${{ github.sha }}" --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}