Skip to content

Commit

Permalink
Merge pull request #129 from sabre1041/gh-actions
Browse files Browse the repository at this point in the history
GitHub Actions
  • Loading branch information
Kurtis Mullins authored Jan 20, 2020
2 parents b705223 + 7d5b123 commit 40202f5
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 37 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: CI/CD
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Go Configuration
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Checkout code
uses: actions/checkout@v1

- name: Build
run: make

- name: Test
run: make native-test

- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: quay-operator
path: build/_output/bin

latest-image:
name: Build Latest Image
runs-on: ubuntu-latest
if: "github.repository == 'redhat-cop/quay-operator' && !startsWith(github.ref, 'refs/tags') && github.ref == 'refs/heads/master'"
needs: ["build"]
steps:
- name: Check out code
uses: actions/checkout@v1

- name: Download Artifact
uses: actions/download-artifact@v1
with:
name: quay-operator
path: build/_output/bin

- name: Build and Publish Latest Image
env:
DOCKER_USER: ${{ secrets.DockerUser }}
DOCKER_PASSWORD: ${{ secrets.DockerPassword }}
REPOSITORY: ${{ secrets.Repository }}
run: "make ci-latest-deploy"

release-image:
name: Build Release Image
runs-on: ubuntu-latest
if: "github.repository == 'redhat-cop/quay-operator' && startsWith(github.ref, 'refs/tags') && github.ref == 'refs/heads/master'"
needs: ["build"]
steps:
- name: Check Out Code
uses: actions/checkout@v1

- name: Download Artifact
uses: actions/download-artifact@v1
with:
name: quay-operator
path: build/_output/bin

- name: Build and Publish Release Image
env:
DOCKER_USER: ${{ secrets.DockerUser }}
DOCKER_PASSWORD: ${{ secrets.DockerPassword }}
REPOSITORY: ${{ secrets.Repository }}
run: "make ci-release-deploy"
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ docker-build:
docker-push:
docker push ${IMG}

# Travis Latest Tag Deployment
travis-latest-deploy: docker-login docker-build docker-push
# CI Latest Tag Deployment
ci-latest-deploy: docker-login docker-build docker-push

# Travis Dev Deployment
travis-dev-deploy: docker-login docker-build docker-push-dev
# CI Dev Deployment
ci-dev-deploy: docker-login docker-build docker-push-dev

# Travis Release
travis-release-deploy: docker-login docker-build docker-push-release
# CI Release
ci-release-deploy: docker-login docker-build docker-push-release
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# quay-operator

[![Build Status](https://travis-ci.org/redhat-cop/quay-operator.svg?branch=master)](https://travis-ci.org/redhat-cop/quay-operator) [![Docker Repository on Quay](https://quay.io/repository/redhat-cop/quay-operator/status "Docker Repository on Quay")](https://quay.io/repository/redhat-cop/quay-operator)
[![Build Status](https://github.com/redhat-cop/quay-operator/workflows/.github/workflows/ci.yml/badge.svg?branch=master)](https://github.com/redhat-cop/quay-operator/actions?workflow=CI%2FCD)
[![Docker Repository on Quay](https://quay.io/repository/redhat-cop/quay-operator/status "Docker Repository on Quay")](https://quay.io/repository/redhat-cop/quay-operator)

Operator to manage the lifecycle of [Quay](https://www.openshift.com/products/quay).

Expand Down

0 comments on commit 40202f5

Please sign in to comment.