Skip to content

Commit 4913c91

Browse files
committed
Fixes and auto-build
1 parent 91f6d77 commit 4913c91

File tree

3 files changed

+20
-42
lines changed

3 files changed

+20
-42
lines changed
Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,45 @@
1-
name: Docker
2-
3-
# This workflow uses actions that are not certified by GitHub.
4-
# They are provided by a third-party and are governed by
5-
# separate terms of service, privacy policy, and support
6-
# documentation.
1+
name: Build and Push
72

83
on:
94
push:
5+
branches: [main, test]
106
# Publish semver tags as releases.
11-
tags: [ 'v*.*.*' ]
7+
tags: ["v*.*.*", "v*.*.*.*"]
128

139
env:
14-
# Use docker.io for Docker Hub if empty
1510
REGISTRY: ghcr.io
16-
# github.repository as <account>/<repo>
17-
IMAGE_NAME: ${{ github.repository }}
18-
1911

2012
jobs:
2113
build:
22-
2314
runs-on: ubuntu-latest
24-
permissions:
25-
contents: read
26-
packages: write
27-
# This is used to complete the identity challenge
28-
# with sigstore/fulcio when running outside of PRs.
29-
id-token: write
3015

3116
steps:
3217
- name: Checkout repository
3318
uses: actions/checkout@v3
3419

35-
# Workaround: https://github.com/docker/build-push-action/issues/461
36-
- name: Setup Docker buildx
37-
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
38-
39-
# Login against a Docker registry except on PR
40-
# https://github.com/docker/login-action
4120
- name: Log into registry ${{ env.REGISTRY }}
42-
if: github.event_name != 'pull_request'
43-
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
21+
uses: docker/login-action@v2
4422
with:
4523
registry: ${{ env.REGISTRY }}
4624
username: ${{ github.actor }}
4725
password: ${{ secrets.GITHUB_TOKEN }}
4826

49-
# Extract metadata (tags, labels) for Docker
50-
# https://github.com/docker/metadata-action
51-
- name: Extract Docker metadata
52-
id: meta
53-
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
27+
- name: Generate release tag
28+
id: generate_release_tag
29+
uses: amitsingh-007/next-release-tag@v4.0.0
5430
with:
55-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
tag_prefix: "v"
33+
tag_template: "yyyy.mm.dd.i"
5634

57-
# Build and push Docker image with Buildx (don't push on PR)
58-
# https://github.com/docker/build-push-action
5935
- name: Build and push Docker image
60-
id: build-and-push
61-
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
36+
uses: docker/build-push-action@v3
6237
with:
6338
context: .
64-
push: ${{ github.event_name != 'pull_request' }}
65-
tags: ${{ steps.meta.outputs.tags }}
66-
labels: ${{ steps.meta.outputs.labels }}
39+
push: true
40+
tags: ghcr.io/${{ github.repository }}:${{ steps.generate_release_tag.outputs.next_release_tag }}
41+
42+
- name: Create release
43+
uses: ncipollo/release-action@v1
44+
with:
45+
tag: ${{ steps.generate_release_tag.outputs.next_release_tag }}

src/web/src/modules/administration/store/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let m = useNotificationStore();
1111
interface AdminState {
1212
users: Array<AppUser>;
1313
selectedUser: AppUser | undefined;
14-
isLoading: Boolean;
14+
isLoading: boolean;
1515
centres: VisitorCentre[];
1616
selectedCentre: VisitorCentre | undefined;
1717
kiosks: any[];
@@ -182,7 +182,6 @@ export const useAdminStore = defineStore("admin", {
182182
this.getAllKiosks();
183183
})
184184
.finally(() => {
185-
186185
if (this.selectedKiosk.items.length == 0) this.unselectKiosk();
187186
this.isLoading = false;
188187
});

src/web/src/store/models/VisitorCentre.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export interface VisitorCentre {
44
community: string;
55
region: string;
66
is_active: Boolean;
7-
reminders_at: string;
7+
reminders_at: string[];
88
reminders_when: string;
99
}
1010

0 commit comments

Comments
 (0)