1
0
mirror of https://github.com/Jguer/yay.git synced 2026-05-05 04:16:10 +02:00

fix(ci): fix CI issues

This commit is contained in:
jguer 2020-09-08 00:02:28 +02:00
parent 5ae510ad6f
commit 8a0a0cf2bc
No known key found for this signature in database
GPG Key ID: 6D6CC9BEA8556B35
4 changed files with 43 additions and 8 deletions

24
.github/workflows/builder-image.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Builder image
on:
schedule:
- cron: "0 3 * * 1"
push:
paths:
- "ci.Dockerfile"
- "**/builder-image.yml"
jobs:
build:
name: Push builder image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: jguer/yay-builder
dockerfile: ci.Dockerfile
tags: latest

View File

@ -15,7 +15,7 @@ jobs:
name: Lint and test yay
runs-on: ubuntu-latest
container:
image: samip537/archlinux:devel
image: jguer/yay-builder:latest
steps:
- name: Checkout
uses: actions/checkout@v2
@ -25,9 +25,7 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run Build and tests
run: |
pacman -Sy --noconfirm go
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.27.0
./bin/golangci-lint run ./...
make test
- name: Lint
run: /app/bin/golangci-lint run ./...
- name: Run Build and Tests
run: make test

13
ci.Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM lopsided/archlinux:devel
LABEL maintainer="Jguer,joaogg3 at google mail"
ENV GO111MODULE=on
WORKDIR /app
RUN pacman -Syu --overwrite=* --needed --noconfirm go git
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.30.0
COPY go.mod .
RUN go mod download

2
go.mod
View File

@ -11,7 +11,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.6.1
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
golang.org/x/sys v0.0.0-20200820212457-1fb795427249 // indirect
golang.org/x/sys v0.0.0-20200820212457-1fb795427249
gopkg.in/h2non/gock.v1 v1.0.15
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
)