Slide 1

Slide 1 text

TRACK: CI/CD CONTINUOUS EVERYTHING NOVEMBER 12, 2020 Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz

Slide 2

Slide 2 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Lothar Schulz lotharschulz.info github.com/lotharschulz speakerdeck.com/lothar @lothar_schulz lnkd.in/in/lotharschulz Open Source CI/CD Components for GitHub Actions

Slide 3

Slide 3 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz What are GitHub Actions? Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz With GitHub Actions, workflows and steps are just code in a repository, so you can create, share, reuse, and fork your software development practices. Open Source CI/CD Components for GitHub Actions

Slide 4

Slide 4 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions

Slide 5

Slide 5 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz github.com/sdras/awesome-actions#community-resources

Slide 6

Slide 6 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Actions Internal Marketplace Open Source CI/CD Components for GitHub Actions Actions Internal Marketplace blog post Actions Marketplace repository

Slide 7

Slide 7 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz How To Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions

Slide 8

Slide 8 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Jobs Jobs can run at the same time in parallel or be dependent on the status of a previous job and run sequentially. build-and-dockerhub-push-if-linux: needs: [benchmark, test] Open Source CI/CD Components for GitHub Actions

Slide 9

Slide 9 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Matrix strategy: fail-fast: false matrix: os: [macOS-10.14, ubuntu-18.04] goos: [linux, darwin] exclude: - os: macOS-10.14 goos: linux - os: ubuntu-18.04 goos: darwin runs-on: ${{ matrix.os }} Open Source CI/CD Components for GitHub Actions

Slide 10

Slide 10 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Fail fast or slow strategy: fail-fast: false matrix: os: [macOS-10.14, ubuntu-18.04] goos: [linux, darwin] exclude: - os: macOS-10.14 goos: linux - os: ubuntu-18.04 goos: darwin runs-on: ${{ matrix.os }} Open Source CI/CD Components for GitHub Actions

Slide 11

Slide 11 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Excludes strategy: fail-fast: false matrix: os: [macOS-10.14, ubuntu-18.04] goos: [linux, darwin] exclude: - os: macOS-10.14 goos: linux - os: ubuntu-18.04 goos: darwin runs-on: ${{ matrix.os }} exclude: - os: macOS-10.14 goos: linux - os: ubuntu-18.04 goos: darwin Open Source CI/CD Components for GitHub Actions

Slide 12

Slide 12 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Includes strategy: fail-fast: false matrix: os: [macOS-10.14, ubuntu-18.04] goos: [linux, darwin] exclude: - os: macOS-10.14 goos: linux - os: ubuntu-18.04 goos: darwin runs-on: ${{ matrix.os }} exclude: - os: macOS-10.14 goos: linux - os: ubuntu-18.04 goos: darwin include: - os: macOS-10.14 goos: darwin - os: ubuntu-18.04 goos: linux ! Open Source CI/CD Components for GitHub Actions

Slide 13

Slide 13 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Build only what you need task testMatrix { project.afterEvaluate { def checkTasks = subprojects.collect { it.tasks.findByName("check") }.findAll { it != null } dependsOn(checkTasks) doLast { def checkTaskPaths = checkTasks .collect { it.path } println(JsonOutput.toJson(checkTaskPaths)) } } } faster parallel github builds https://github.com/testcontainers/testcontainers-java/blob/master/gradle/ci-support.gradle#L4-L18 Open Source CI/CD Components for GitHub Actions

Slide 14

Slide 14 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Build only what you need TASKS=$(./gradlew --no-daemon --parallel -q testMatrix) echo $TASKS echo "::set-output name=matrix::{\"gradle_args\":$TASKS}" faster parallel github builds https://github.com/testcontainers/testcontainers-java/blob/master/gradle/ci-support.gradle#L4-L18 Open Source CI/CD Components for GitHub Actions

Slide 15

Slide 15 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Security ... run: echo ${{ github.event.issue.title }} ... env: TITLE: ${{ github.event.issue.title }} run: echo "$TITLE" ... https://securitylab.github.com/research/github-actions-untrusted-input/ https://blog.ryotak.me/post/github-actions-supplychain/ Open Source CI/CD Components for GitHub Actions

Slide 16

Slide 16 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Code Open Source CI/CD Components for GitHub Actions

Slide 17

Slide 17 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions

Slide 18

Slide 18 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Self Hosted & Awesome Runners https://github.com/jonico/awesome-runners lotharschulz.info/2019/12/09/github-action-self-hosted-runners-on-aws-incl-spot-instances Open Source CI/CD Components for GitHub Actions

Slide 19

Slide 19 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Issue Ops https://github.com/jonico/auto-scaling-github-runners-ec2-issueops https://github.com/jonico/auto-scaling-github-runners-kubernetes-issueops Open Source CI/CD Components for GitHub Actions

Slide 20

Slide 20 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz There is more Open Source CI/CD Components for GitHub Actions Core concepts Encrypted secrets Reusing workflows & composite actions

Slide 21

Slide 21 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz There is more Contexts available on run time Triggered by own events Package manager and gh docker registry integrated Open Source CI/CD Components for GitHub Actions

Slide 22

Slide 22 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz There is more Open Source CI/CD Components for GitHub Actions Run github actions locally Organization Workflows first-issue-greeter & github-workflow-sync

Slide 23

Slide 23 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Alternatives Open Source CI/CD Components for GitHub Actions Migrating from GitLab CI/CD to GitHub Actions GitLab CI/CD <-> GitHub Actions Migration from GitHub Actions to GitLab CI/CD

Slide 24

Slide 24 text

TRACK: CI/CD CONTINUOUS EVERYTHING Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz Open Source CI/CD Components for GitHub Actions ADDO 2021 10 28 @lothar_schulz I am sure you have questions. Open Source CI/CD Components for GitHub Actions image: © https://pixabay.com/photos/girl-child-astonished-surprised-388652