Skip to content

Commit

Permalink
Upd: Simplify GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bokysan committed Apr 13, 2022
1 parent f3554a3 commit 26a784e
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/actions/buildx-setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Setup docker buildx'
description: 'Setup docker buildx'

runs:
using: "composite"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
with:
install: true

- name: Get release version
id: version_number
shell: bash
run: |
echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
echo "::set-output name=RELEASE_VERSION::${GITHUB_REF:10}"
11 changes: 11 additions & 0 deletions .github/actions/docker-hub-login/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'Setup docker buildx'
description: 'Setup docker buildx'

runs:
using: "composite"
steps:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: 'boky'
password: '${{ secrets.DOCKER_ACCESS_TOKEN }}'
8 changes: 8 additions & 0 deletions .github/actions/helm-chart-tests/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: 'Helm chart tests'
description: 'Execute Helm chart tests'

runs:
using: "composite"
steps:
- name: Run HELM chart tests
run: ./helm/tests.sh
22 changes: 22 additions & 0 deletions .github/actions/integration-tests/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Integration tests'
description: 'Execute integration tests'

runs:
using: "composite"
steps:
- name: Run integration tests
shell: bash
env: # Or as an environment variable
XOAUTH2_RELAYHOST_USERNAME: ${{ secrets.XOAUTH2_RELAYHOST_USERNAME }}
XOAUTH2_CLIENT_ID: ${{ secrets.XOAUTH2_CLIENT_ID }}
XOAUTH2_SECRET: ${{ secrets.XOAUTH2_SECRET }}
XOAUTH2_INITIAL_REFRESH_TOKEN: ${{ secrets.XOAUTH2_INITIAL_REFRESH_TOKEN }}
run: |
echo "RELAYHOST_USERNAME=${XOAUTH2_RELAYHOST_USERNAME}" > integration-tests/xoauth2/.env
echo "FROM=${XOAUTH2_RELAYHOST_USERNAME}" >> integration-tests/xoauth2/.env
echo "TO=${XOAUTH2_RELAYHOST_USERNAME}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_CLIENT_ID=${XOAUTH2_CLIENT_ID}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_SECRET=${XOAUTH2_SECRET}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_INITIAL_REFRESH_TOKEN=${XOAUTH2_INITIAL_REFRESH_TOKEN}" >> integration-tests/xoauth2/.env
cp integration-tests/xoauth2/.env integration-tests/xoauth2-error/.env
./integration-tests.sh
8 changes: 8 additions & 0 deletions .github/actions/unit-tests/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: 'Unit tests'
description: 'Execute unit tests'

runs:
using: "composite"
steps:
- name: Run unit tests
run: ./unit-tests.sh

0 comments on commit 26a784e

Please sign in to comment.