Skip to content

Merge pull request #28 from lucasew/dep-update #65

Merge pull request #28 from lucasew/dep-update

Merge pull request #28 from lucasew/dep-update #65

Workflow file for this run

name: "CI and deployment"
on: [push]
jobs:
ci-and-release:
name: "CI and release"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
USERNAME: ${{ github.actor }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/checkout@v1
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME }}
password: ${{ github.token }}
- name: "Build e publicação do container"
env:
TAG: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
if: github.ref_type == 'tag'
run: |
nix build .#container && ./result | docker load
docker tag $( docker image ls -f reference=ts-proxy --format '{{.ID}}' ) ${{ env.TAG }}:$( docker image ls -f reference=ts-proxy --format '{{.Tag}}' )
docker push ${{ env.TAG }}:$( docker image ls -f reference=ts-proxy --format '{{.Tag}}' )