mirror of
https://codeberg.org/demostf/backup.git
synced 2026-06-03 18:04:08 +02:00
nix docker image
This commit is contained in:
parent
8a7a161677
commit
938ca06599
3 changed files with 33 additions and 32 deletions
21
.github/workflows/ci.yaml
vendored
21
.github/workflows/ci.yaml
vendored
|
|
@ -49,7 +49,7 @@ jobs:
|
|||
- uses: Swatinem/rust-cache@v1
|
||||
- uses: lriesebos/nix-develop-command@6f5f4830884d1957767e920c51d6118c9b0ac828
|
||||
with:
|
||||
command: "cargo clippy -D warnings"
|
||||
command: "cargo clippy -- -D warnings"
|
||||
|
||||
build:
|
||||
name: Build
|
||||
|
|
@ -62,4 +62,21 @@ jobs:
|
|||
name: ci
|
||||
instance: https://cache.icewind.me
|
||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
||||
- run: nix build .#${{ matrix.target }}
|
||||
- run: nix build .#${{ matrix.target }}
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v20
|
||||
- uses: icewind1991/attic-action@v1
|
||||
with:
|
||||
name: ci
|
||||
instance: https://cache.icewind.me
|
||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
||||
- run: nix build .#dockerImage
|
||||
- name: Push image
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
skopeo copy --dest-creds="${{ secrets.DOCKERHUB_USERNAME }}:${{ secrets.DOCKERHUB_TOKEN }}" "docker-archive:$(nix build .#dockerImage --print-out-paths)" "docker://demostf/backup"
|
||||
27
.github/workflows/docker.yaml
vendored
27
.github/workflows/docker.yaml
vendored
|
|
@ -1,27 +0,0 @@
|
|||
name: docker-build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: demostf/backup:latest
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue