Slide 1

Slide 1 text

GitHub Actions Continuous Delivery 101 ScaleUp 360° Continuous Delivery Europe Lothar Schulz 2020 07 10 pic: © moovel GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 @lothar_schulz

Slide 2

Slide 2 text

pic: © moovel GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 @lothar_schulz

Slide 3

Slide 3 text

pic: © moovel GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 @lothar_schulz

Slide 4

Slide 4 text

Engineering Manager lotharschulz.info github.com/lotharschulz speakerdeck.com/lothar @lothar_schulz lnkd.in/lotharschulz CI/CD Meetup Berlin medium.com/reachnow-tech Me @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 5

Slide 5 text

GitHub Actions Workflow Automation @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 6

Slide 6 text

Built-in CI/CD GitHub Actions @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 7

Slide 7 text

What are GitHub Actions? With GitHub Actions, workflows and steps are just code in a repository, so you can create, share, reuse, and fork your software development practices. @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 https://github.blog/2019-08-08-github-actions-now-supports-ci-cd/

Slide 8

Slide 8 text

@lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 9

Slide 9 text

Open Source pic: © moovel @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 10

Slide 10 text

@lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 github.com/actions

Slide 11

Slide 11 text

@lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 github.com/sdras/ awesome-actions #community-resources

Slide 12

Slide 12 text

@lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 13

Slide 13 text

@lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 github.com/ jessfraz/ shaking-finger-action

Slide 14

Slide 14 text

@lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 Open Source Projects using GitHub actions (incomplete list) • https://github.com/gatsbyjs/gatsby/tree/master/.github/workflows • https://github.com/hakimel/reveal.js/blob/master/.github/workflows/js.yml • https://github.com/twbs/bootstrap/blob/master/.github/workflows/test.yml • https://github.com/microsoft/vscode/tree/master/.github/workflows • https://github.com/facebook/create-react-app/tree/master/.github/workflows • https://github.com/hakimel/reveal.js/blob/master/.github/workflows/js.yml • https://github.com/babel/babel/tree/master/.github/workflows • https://github.com/nodejs/node/tree/master/.github/workflows • https://github.com/microsoft/TypeScript/tree/master/.github/workflows • https://github.com/kubernetes/utils/tree/master/.github/workflows • https://github.com/jonico/programmatic-runner-test/blob/master/.github/workflows/blank.yml

Slide 15

Slide 15 text

How To's pic: © moovel @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 16

Slide 16 text

Matrix - Builds on Linux, macOS, Windows @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 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 }}

Slide 17

Slide 17 text

Matrix - Excludes @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 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

Slide 18

Slide 18 text

Matrix - Includes & Excludes @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 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

Slide 19

Slide 19 text

Matrix - Includes & Excludes @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 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 !

Slide 20

Slide 20 text

Jobs @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 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]

Slide 21

Slide 21 text

Conditionals @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 if: matrix.os == 'ubuntu-18.04' env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} run: | d=$(date +%Y-%m-%d) tag=$d-${{ matrix.os }}-${{ github.sha }} docker build -t lotharschulz/hello-github-actions:$tag . docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD} docker push lotharschulz/hello-github-actions:$tag

Slide 22

Slide 22 text

Matrix @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 23

Slide 23 text

Matrix @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 24

Slide 24 text

Matrix @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 25

Slide 25 text

Surprises @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 test: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 with: java-version: 11 - uses: eskatos/gradle-command-action@v1 with: arguments: test - name: test the code

Slide 26

Slide 26 text

Fix @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 test: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 with: java-version: 11 - uses: eskatos/gradle-command-action@v1 with: arguments: test # - name: test the code

Slide 27

Slide 27 text

Demo @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 28

Slide 28 text

Demo Code @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 29

Slide 29 text

There is even more ● Core concepts ● Encrypted secrets ● Self hosted runners @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 30

Slide 30 text

There is more ● Contexts available on run time ● Triggered by own events ● Package manager and gh docker registry integrated @lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10

Slide 31

Slide 31 text

@lothar_schulz GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 pic: © moovel THANK YOU

Slide 32

Slide 32 text

@lothar_schulz Open Source CI/CD components for GitHub Actions | FossAsia Summit | Lothar Schulz | 2020 03 19 pic: © moovel THANK YOU SLIDE DECK GitHub Actions Continuous Delivery 101 | ScaleUp 360° Continuous Delivery Europe | Lothar Schulz | 2020 06 10 @lothar_schulz pic: © moovel