ci(dockerfile): clean pkg cache

This commit is contained in:
jguer 2020-09-29 09:43:20 +02:00
parent 1f3020e7d6
commit a80771c37e
No known key found for this signature in database
GPG key ID: 6D6CC9BEA8556B35
2 changed files with 17 additions and 8 deletions

View file

@ -9,16 +9,24 @@ on:
- "**/builder-image.yml"
jobs:
build:
name: Push builder image to GitHub Packages
name: Push builder image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
- name: Checkout
uses: actions/checkout@v2
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: jguer/yay-builder
dockerfile: ci.Dockerfile
tags: latest
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
platforms: linux/amd64, linux/arm/v6,linux/arm/v7,linux/arm64
file: ci.Dockerfile
push: true
tags: jguer/yay-builder:latest

View file

@ -4,7 +4,8 @@ LABEL maintainer="Jguer,joaogg3 at google mail"
ENV GO111MODULE=on
WORKDIR /app
RUN pacman -Syu --overwrite=* --needed --noconfirm go fakeroot binutils gcc make git
RUN pacman -Syu --overwrite=* --needed --noconfirm go fakeroot binutils gcc make git &&\
rm -rfv /var/cache/pacman/* /var/lib/pacman/sync/*
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.31.0