TD-222: Reuse valitydev/action-deploy-docker (#23)

* Switch to valitydev/bouncer-client-erlang@b6c7be0
* Switch to valitydev/machinery-erlang@62c3243
* Use valitydev/action-deploy-docker@634e37d
This commit is contained in:
Andrew Mayorov 2022-07-08 17:33:13 +03:00 committed by GitHub
parent a5a9c54224
commit 3c7326daee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 50 deletions

View File

@ -1,4 +1,4 @@
name: Build Docker image name: Build and publish Docker image
on: on:
push: push:
@ -6,48 +6,16 @@ on:
- 'master' - 'master'
- 'epic/**' - 'epic/**'
pull_request: pull_request:
branches: [ '**' ] branches: ['**']
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
jobs: jobs:
build: build-push:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - uses: valitydev/action-deploy-docker@634e37d1a5367a0d3029a271b1112f22ce891d23
uses: actions/checkout@v2
- name: Setup Buildx
uses: docker/setup-buildx-action@v1
# https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#setting-an-environment-variable
- name: Update environment variables
run: grep -v '^#' .env >> $GITHUB_ENV
- name: Log in to the Container registry
uses: docker/login-action@v1.12.0
with: with:
registry: ${{ env.REGISTRY }} registry-username: ${{ github.actor }}
username: ${{ github.actor }} registry-access-token: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Construct tags / labels for an image
id: meta
uses: docker/metadata-action@v3.6.2
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v2.9.0
with:
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
SERVICE_NAME=${{ env.SERVICE_NAME }}
OTP_VERSION=${{ env.OTP_VERSION }}
THRIFT_VERSION=${{ env.THRIFT_VERSION }}

View File

@ -6,7 +6,7 @@ on:
- 'master' - 'master'
- 'epic/**' - 'epic/**'
pull_request: pull_request:
branches: [ '**' ] branches: ['**']
jobs: jobs:
setup: setup:

View File

@ -39,8 +39,8 @@
{scoper, {git, "https://github.com/valitydev/scoper.git", {branch, "master"}}}, {scoper, {git, "https://github.com/valitydev/scoper.git", {branch, "master"}}},
{erl_health, {git, "https://github.com/valitydev/erlang-health.git", {branch, "master"}}}, {erl_health, {git, "https://github.com/valitydev/erlang-health.git", {branch, "master"}}},
%% Only needed for some utility functions %% Only needed for some utility functions
{bouncer_client, {git, "https://github.com/valitydev/bouncer_client_erlang.git", {branch, "master"}}}, {bouncer_client, {git, "https://github.com/valitydev/bouncer-client-erlang.git", {branch, "master"}}},
{machinery, {git, "https://github.com/valitydev/machinery.git", {branch, "master"}}} {machinery, {git, "https://github.com/valitydev/machinery-erlang.git", {branch, "master"}}}
]}. ]}.
%% Helpful plugins. %% Helpful plugins.

View File

@ -1,11 +1,11 @@
{"1.2.0", {"1.2.0",
[{<<"bouncer_client">>, [{<<"bouncer_client">>,
{git,"https://github.com/valitydev/bouncer_client_erlang.git", {git,"https://github.com/valitydev/bouncer-client-erlang.git",
{ref,"535449a459b70643836c440a863b42656f2a1409"}}, {ref,"b6c7be05e24f46121f42ae5a48232b94f78c9c5c"}},
0}, 0},
{<<"bouncer_proto">>, {<<"bouncer_proto">>,
{git,"https://github.com/valitydev/bouncer-proto", {git,"https://github.com/valitydev/bouncer-proto",
{ref,"8da12fe98bc751e7f8f17f64ad4f571a6a63b0fe"}}, {ref,"633ba73e376ab06587499bd163cf807a9c34b8f7"}},
1}, 1},
{<<"cache">>,{pkg,<<"cache">>,<<"2.3.3">>},1}, {<<"cache">>,{pkg,<<"cache">>,<<"2.3.3">>},1},
{<<"certifi">>,{pkg,<<"certifi">>,<<"2.8.0">>},2}, {<<"certifi">>,{pkg,<<"certifi">>,<<"2.8.0">>},2},
@ -29,18 +29,18 @@
{<<"jose">>,{pkg,<<"jose">>,<<"1.11.1">>},0}, {<<"jose">>,{pkg,<<"jose">>,<<"1.11.1">>},0},
{<<"jsx">>,{pkg,<<"jsx">>,<<"3.1.0">>},0}, {<<"jsx">>,{pkg,<<"jsx">>,<<"3.1.0">>},0},
{<<"machinery">>, {<<"machinery">>,
{git,"https://github.com/valitydev/machinery.git", {git,"https://github.com/valitydev/machinery-erlang.git",
{ref,"db7c94b9913451e9558afa19f2fe77bf48d391da"}}, {ref,"62c32434c80a462956ad9d50f9bce47836580d77"}},
0}, 0},
{<<"metrics">>,{pkg,<<"metrics">>,<<"1.0.1">>},2}, {<<"metrics">>,{pkg,<<"metrics">>,<<"1.0.1">>},2},
{<<"mg_proto">>, {<<"mg_proto">>,
{git,"https://github.com/valitydev/machinegun-proto.git", {git,"https://github.com/valitydev/machinegun-proto.git",
{ref,"d814d6948d4ff13f6f41d12c6613f59c805750b2"}}, {ref,"7d780d5aa445e37b4816ac8a433bfaffe3715f63"}},
1}, 1},
{<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.2.0">>},2}, {<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.2.0">>},2},
{<<"org_management_proto">>, {<<"org_management_proto">>,
{git,"https://github.com/valitydev/org-management-proto.git", {git,"https://github.com/valitydev/org-management-proto",
{ref,"06c5c8430e445cb7874e54358e457cbb5697fc32"}}, {ref,"f433223706284000694e54e839fafb10db84e2b3"}},
1}, 1},
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.1">>},2}, {<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.1">>},2},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.8.0">>},2}, {<<"ranch">>,{pkg,<<"ranch">>,<<"1.8.0">>},2},

View File

@ -120,7 +120,7 @@ deserialize(Type, Data) ->
-spec marshal_unmarshal_status_changed_test() -> _. -spec marshal_unmarshal_status_changed_test() -> _.
-define(CONTEXT, #{ -define(CONTEXT, #{
machine_ref => <<"TEST">>, machine_id => <<"TEST">>,
machine_ns => test machine_ns => test
}). }).