Atualizações do CI, actions e Ubuntu #152
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |