Remove: follows do flake-utils e urls do ix.io, e adiciona nix fmt (#17) #57
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: Faz push das imagens | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
push: | |
name: Build & Push | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
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 containers-image containers-common | |
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 e push da imagem 3.8 | |
run: | | |
make build.and.push IMAGE_TAG=3.8 CONTAINERFILE=Containerfile_3.8 USERNAME=${{ github.actor }} PASSWORD=${{ secrets.GITHUB_TOKEN }} | |
make build.and.push IMAGE_TAG=dev-latest CONTAINERFILE=Containerfile_3.8 USERNAME=${{ github.actor }} PASSWORD=${{ secrets.GITHUB_TOKEN }} | |
- name: Faz build e push da imagem 3.9 | |
run: | | |
make build.and.push IMAGE_TAG=3.9 CONTAINERFILE=Containerfile_3.9 USERNAME=${{ github.actor }} PASSWORD=${{ secrets.GITHUB_TOKEN }} | |
- name: Faz build e push da imagem 3.10 | |
run: | | |
make build.and.push IMAGE_TAG=3.10 CONTAINERFILE=Containerfile_3.10 USERNAME=${{ github.actor }} PASSWORD=${{ secrets.GITHUB_TOKEN }} | |
- name: Faz build e push da imagem 3.11 | |
run: | | |
make build.and.push IMAGE_TAG=3.11 CONTAINERFILE=Containerfile_3.11 USERNAME=${{ github.actor }} PASSWORD=${{ secrets.GITHUB_TOKEN }} | |
- name: Lista imagens | |
run: podman images |