Skip to content

Commit 8fd1aae

Browse files
addshoreoutdooracorn
authored andcommitted
Don't require GITHUB_TOKEN in docker related flows (#19)
* Don't require GITHUB_TOKEN in docker related flows * Dockerfile, use ADD instead of COPY
1 parent 1ad0723 commit 8fd1aae

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.github/workflows/docker.build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: docker/setup-qemu-action@v1.1.0
2727
-
2828
name: Set up Docker Buildx
29-
uses: docker/setup-buildx-action@v1
29+
uses: docker/setup-buildx-action@v1.3.0
3030
-
3131
name: Cache Docker layers
3232
uses: actions/cache@v2.1.5
@@ -37,7 +37,8 @@ jobs:
3737
${{ runner.os }}-buildx-
3838
-
3939
name: Login to GitHub Container Registry
40-
uses: docker/login-action@v1.9.0
40+
uses: docker/login-action@v1.9.0
41+
if: github.event_name != 'pull_request'
4142
with:
4243
registry: ghcr.io
4344
username: ${{ github.repository_owner }}

.github/workflows/docker.lint.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v2.3.4
1515
- name: lint
16-
uses: luke142367/Docker-Lint-Action@v1.1.1
16+
uses: hadolint/hadolint-action@v1.5.0
1717
with:
18-
target: Dockerfile
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
dockerfile: Dockerfile

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ FROM nginx:1-alpine
1616
LABEL org.opencontainers.image.source="https://github.com/wbstack/queryservice-ui"
1717

1818

19-
ADD ./docker/default.conf /etc/nginx/conf.d/default.conf
19+
COPY ./docker/default.conf /etc/nginx/conf.d/default.conf
2020
COPY --from=builder --chown=nginx:nginx /src/app/build /usr/share/nginx/html

0 commit comments

Comments
 (0)