You've already forked snikket-web-portal
Merge pull request #47 from snikket-im/feature/ci-no-push
Disable GitHub pushing to Docker Hub and include docker build in standard CI testing
This commit is contained in:
23
.github/workflows/build-portal-image.yml
vendored
23
.github/workflows/build-portal-image.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Docker image build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Build the Docker image
|
|
||||||
run: >-
|
|
||||||
docker build . \
|
|
||||||
--build-arg=BUILD_SERIES=dev \
|
|
||||||
--build-arg=BUILD_ID="$(echo "$GITHUB_SHA" | head -c 12)" \
|
|
||||||
--tag snikket/snikket-web-portal:dev
|
|
||||||
- name: Log into registry
|
|
||||||
run: echo "${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" | docker login -u snikket --password-stdin
|
|
||||||
- name: Push the Docker image
|
|
||||||
run: docker push snikket/snikket-web-portal:dev
|
|
||||||
31
.github/workflows/build-portal-release-image.yml
vendored
31
.github/workflows/build-portal-release-image.yml
vendored
@@ -1,31 +0,0 @@
|
|||||||
---
|
|
||||||
name: Docker release image build
|
|
||||||
|
|
||||||
"on":
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- release/*.*
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Build the Docker image
|
|
||||||
run: >-
|
|
||||||
echo "Building ref $GITHUB_REF...";
|
|
||||||
RELEASE_TAG="${GITHUB_REF#refs/tags/release/}";
|
|
||||||
RELEASE_SERIES="${RELEASE_TAG%.*}";
|
|
||||||
RELEASE_VER="${RELEASE_TAG#$RELEASE_SERIES.}";
|
|
||||||
docker build . \
|
|
||||||
--build-arg=BUILD_SERIES="$RELEASE_SERIES" \
|
|
||||||
--build-arg=BUILD_ID="$RELEASE_VER" \
|
|
||||||
--tag snikket/snikket-web-portal:"$RELEASE_SERIES"
|
|
||||||
- name: Log into registry
|
|
||||||
run: echo "${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" | docker login -u snikket --password-stdin
|
|
||||||
- name: Push the Docker image
|
|
||||||
run: >-
|
|
||||||
RELEASE_TAG="${GITHUB_REF#refs/tags/release/}";
|
|
||||||
RELEASE_SERIES="${RELEASE_TAG%.*}";
|
|
||||||
docker push snikket/snikket-web-portal:"$RELEASE_SERIES"
|
|
||||||
9
.github/workflows/main.yaml
vendored
9
.github/workflows/main.yaml
vendored
@@ -48,3 +48,12 @@ jobs:
|
|||||||
- name: Linting
|
- name: Linting
|
||||||
run: |
|
run: |
|
||||||
python -m flake8 snikket_web
|
python -m flake8 snikket_web
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build the Docker image
|
||||||
|
run: >-
|
||||||
|
docker build .
|
||||||
|
|||||||
Reference in New Issue
Block a user