Skip to content
This repository was archived by the owner on Oct 31, 2021. It is now read-only.

Commit 27b7f9a

Browse files
committed
Upgrading to new container flow
1 parent 4edb606 commit 27b7f9a

File tree

3 files changed

+36
-16
lines changed

3 files changed

+36
-16
lines changed

.github/deploy.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
21
staging:
32
environment: staging
43
production_environment: false
5-
required_contexts: []
4+
required_contexts: [ ]
5+
auto_merge: false
6+
7+
acceptance:
8+
environment: acceptance
9+
production_environment: false
10+
required_contexts: [ ]
611
auto_merge: false

.github/workflows/incoming.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
name: GitHub
1+
name: Pull Request
22

33
on:
44
push:
55
branches:
66
- staging
77
- trying
88

9+
permissions:
10+
actions: read
11+
deployments: none
12+
issues: none
13+
packages: none
14+
pull-requests: none
15+
repository-projects: none
16+
security-events: none
17+
918
jobs:
1019
test:
1120
name: Test
@@ -82,11 +91,11 @@ jobs:
8291
- run: make dependencies
8392
- run: make docs
8493
- run: $GITHUB_WORKSPACE/node_modules/.bin/redoc-cli bundle $GITHUB_WORKSPACE/docs/swagger.yaml -o $GITHUB_WORKSPACE/docs/index.html
85-
docker:
94+
container:
8695
needs:
87-
- test
96+
- "test"
8897
- "pg-test"
89-
name: Docker
98+
name: Container
9099
runs-on: ubuntu-latest
91100
steps:
92101
- uses: actions/checkout@v2

.github/workflows/main.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,23 @@ jobs:
7878
name: Container
7979
runs-on: ubuntu-latest
8080
steps:
81-
- uses: actions/checkout@v2
82-
- name: Build and push ghcr.io
83-
uses: docker/build-push-action@v1
81+
- name: Set up QEMU
82+
uses: docker/setup-qemu-action@v1
83+
- name: Set up Docker Buildx
84+
uses: docker/setup-buildx-action@v1
85+
- name: Container Timestamp
86+
id: timestamp
87+
run: echo "::set-output name=date::$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
88+
- name: Build and push
89+
id: docker_build
90+
uses: docker/build-push-action@v2
8491
with:
85-
registry: ghcr.io
86-
username: ${{ github.actor }}
87-
password: ${{ secrets.GITHUB_TOKEN }}
88-
dockerfile: Dockerfile
89-
path: .
90-
tags: ${{ env.GITHUB_SHA }}
91-
repository: monetr/rest-api
92+
build-args: |
93+
REVISION=${{ env.GITHUB_SHA }}
94+
BUILD_TIME=${{ steps.timestamp.outputs.date }}
95+
push: true
96+
platforms: linux/amd64,linux/arm64
97+
tags: monetr/rest-api:${{ env.GITHUB_SHA }}
9298
docs-deploy:
9399
needs:
94100
- test

0 commit comments

Comments
 (0)