This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
Syndesis daily release #898
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Syndesis daily release | |
on: | |
schedule: | |
- cron: '0 5 * * *' | |
workflow_dispatch: | |
inputs: | |
flags: | |
description: 'Additional command line flags' | |
required: false | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- branch: 1.15.x | |
java: 8 | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ matrix.branch }} | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Check for changes | |
id: should | |
env: | |
BRANCH: ${{ matrix.branch }} | |
run: | | |
RELEASE_TAGS=$(git tag --contains $(git rev-parse HEAD) | grep "^${BRANCH/.x/}") || true | |
if [ -n "${RELEASE_TAGS}" ]; then | |
echo The latest change was already included in a release, skipping release | |
echo ::set-output name=skip::true | |
fi | |
- name: Set up JDK ${{ matrix.java }} | |
if: steps.should.outputs.skip != 'true' | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
- name: Setup Go 1.16 | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.16' | |
- name: Cache Maven Repository | |
if: steps.should.outputs.skip != 'true' | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: release-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: release-${{ runner.os }}-m2 | |
- name: Daily release of ${{ matrix.branch }} | |
if: steps.should.outputs.skip != 'true' | |
env: | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
QUAYIO_USER: ${{ secrets.QUAYIO_USER }} | |
QUAYIO_PASSWORD: ${{ secrets.QUAYIO_PASSWORD }} | |
SYNDESISCI_TOKEN: ${{ secrets.SYNDESISCI_TOKEN }} | |
ADDITIONAL_FLAGS: ${{ github.event.inputs.flags }} | |
run: | | |
git config --global user.email [email protected] | |
git config --global user.name 'Syndesis CI' | |
git config --global 'http.https://github.com/.extraheader' "Authorization: basic $(echo -n x-access-token:${SYNDESISCI_TOKEN}|base64 --wrap=0)" | |
tools/bin/syndesis release --snapshot-release --git-remote origin --docker-user "${DOCKER_USER}" --docker-password "${DOCKER_PASSWORD}" --github-user syndesisci --github-token "${SYNDESISCI_TOKEN}" --quayio-user "${QUAYIO_USER}" --quayio-password "${QUAYIO_PASSWORD}" ${ADDITIONAL_FLAGS} |