mirror of
https://github.com/bokysan/docker-postfix.git
synced 2024-11-10 08:55:39 +08:00
Upd: Simplify GitHub actions
This commit is contained in:
parent
f3554a3eb4
commit
26a784ec68
5 changed files with 70 additions and 0 deletions
21
.github/actions/buildx-setup/action.yaml
vendored
Normal file
21
.github/actions/buildx-setup/action.yaml
vendored
Normal file
|
@ -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
.github/actions/docker-hub-login/action.yaml
vendored
Normal file
11
.github/actions/docker-hub-login/action.yaml
vendored
Normal file
|
@ -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
.github/actions/helm-chart-tests/action.yaml
vendored
Normal file
8
.github/actions/helm-chart-tests/action.yaml
vendored
Normal file
|
@ -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
.github/actions/integration-tests/action.yaml
vendored
Normal file
22
.github/actions/integration-tests/action.yaml
vendored
Normal file
|
@ -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
.github/actions/unit-tests/action.yaml
vendored
Normal file
8
.github/actions/unit-tests/action.yaml
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
name: 'Unit tests'
|
||||||
|
description: 'Execute unit tests'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Run unit tests
|
||||||
|
run: ./unit-tests.sh
|
Loading…
Reference in a new issue