Skip to content

Duo version update (#104) #122

Duo version update (#104)

Duo version update (#104) #122

name: Branch
on:
pull_request:
branches:
- main
- release/**
types: [opened, synchronize, reopened, labeled, unlabeled]
push:
branches:
- main
- release/**
paths-ignore:
- '.github/**'
- 'docs/**'
- 'examples/**'
- 'test/**'
permissions:
pull-requests: write
id-token: write
contents: read
packages: write
jobs:
ci-readme:
uses: cloudposse/.github/.github/workflows/shared-readme.yml@main
if: ${{ github.event_name == 'push' }}
secrets: inherit
ci-codeowners:
uses: cloudposse/.github/.github/workflows/shared-codeowners.yml@main
with:
is_fork: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
secrets: inherit
ci-labels:
runs-on: ubuntu-latest
steps:
- uses: cloudposse/github-action-release-label-validator@v1
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: KengoTODA/actions-setup-docker-compose@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Tests
shell: bash
run: make test
- name: Cleanup
if: always()
shell: bash
run: make cleantest
ci:
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- run: |
echo '${{ toJSON(needs) }}' # easier debug
! ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
needs: [ ci-readme, ci-codeowners, ci-labels, test ]
ci-build-push:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
needs: [ ci ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build
id: build
uses: cloudposse/github-action-docker-build-push@main
with:
registry: registry.hub.docker.com
organization: "${{ github.event.repository.owner.login }}"
repository: "${{ github.event.repository.name }}"
login: "${{ secrets.DOCKERHUB_USERNAME }}"
password: "${{ secrets.DOCKERHUB_PASSWORD }}"
- name: Build GHR
id: build-ghr
uses: cloudposse/github-action-docker-build-push@main
with:
registry: ghcr.io
organization: "${{ github.event.repository.owner.login }}"
repository: "${{ github.event.repository.name }}"
login: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
auto-release:
name: "Release"
needs: [ci, ci-build-push]
uses: cloudposse/.github/.github/workflows/shared-auto-release.yml@main
if: ${{ github.event_name == 'push' }}
with:
publish: true
secrets: inherit