Skip to content

chore(release): bump linkleaner to version 2.6.1 #49

chore(release): bump linkleaner to version 2.6.1

chore(release): bump linkleaner to version 2.6.1 #49

Workflow file for this run

name: Build and deploy
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
concurrency:
group: ${{ github.workflow }}
permissions:
packages: write
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Install Nix
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
trusted-substituters = https://cache.nixos.org https://nix-community.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
- name: Build container image
shell: bash
run: |
nix build .#container
- name: Deploy to fly.io
shell: bash
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: |
# We manually publish the image to avoid having to rewrite the tag
nix run .#skopeo -- \
--insecure-policy \
copy \
docker-archive:./result \
docker://registry.fly.io/linkleaner:latest \
--dest-creds x:"$FLY_API_TOKEN" \
--format v2s2
flyctl deploy
- name: Log in to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish image to GitHub Container Registry
shell: bash
run: |
# Get image details
IMAGE_NAME="$(nix eval --raw .#packages.x86_64-linux.ghContainer.imageName)"
IMAGE_TAG="$(nix eval --raw .#packages.x86_64-linux.ghContainer.imageTag)"
# Build and load the image
nix build .#ghContainer
docker load < ./result
# Push image to ghcr.io
docker push "${IMAGE_NAME}":"${IMAGE_TAG}"