-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 2.18 KB
/
tests.yml
File metadata and controls
72 lines (61 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Test builds
on:
pull_request:
branchs:
- 'feature/**'
- 'hotfix/**'
- 'refactor/**'
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- name: Instala nix single user
run: |
BASE_URL='https://raw.githubusercontent.com/ES-Nix/get-nix/' \
&& SHA256=87fa0f1dbfdd28a1f99b39d5bd4dcc39de97bc64 \
&& NIX_RELEASE_VERSION='2.10.2' \
&& curl -fsSL "${BASE_URL}""$SHA256"/get-nix.sh | sh -s -- ${NIX_RELEASE_VERSION} \
&& . "$HOME"/.nix-profile/etc/profile.d/nix.sh \
&& . ~/."$(basename $SHELL)"rc \
&& export TMPDIR=/tmp \
&& nix flake --version \
&& nix registry pin nixpkgs github:NixOS/nixpkgs/ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b \
&& curl -fsSL https://raw.githubusercontent.com/ES-Nix/get-nix/"$SHA256"/install_direnv_and_nix_direnv.sh | sh \
&& . ~/."$(basename $SHELL)"rc \
&& direnv --version
echo "$HOME"/.nix-profile/bin >> $GITHUB_PATH
# Remove podman via apt-get
- run: |
sudo apt-get purge -y podman
sudo apt-get autoremove --purge
sudo apt-get -y clean
podman --version || echo podman not installed
# Instala podman usando nix
# nix profile install nixpkgs#podman
# Não funciona pois não vem com os arquivos de configuração + permissões no new?idmap
- run: |
nix profile install github:ES-Nix/podman-rootless/83ff27be5616e3029c2aec2de595f86da081e857#podman
podman --version
- name: Faz build da imagem 3.8
run: |
make build IMAGE_TAG=3.8 CONTAINERFILE=Containerfile_3.8
shell: bash
- name: Faz build da imagem 3.9
run: |
make build IMAGE_TAG=3.9 CONTAINERFILE=Containerfile_3.9
shell: bash
- name: Faz build da imagem 3.10
run: |
make build IMAGE_TAG=3.10 CONTAINERFILE=Containerfile_3.10
shell: bash
- name: Faz build da imagem 3.11
run: |
make build IMAGE_TAG=3.11 CONTAINERFILE=Containerfile_3.11
shell: bash
- name: Lista imagens
run: podman images