-
-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* BUILD_IMAGE from environment vairables has precedence. * add workflow. * trigger actions.
- Loading branch information
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: "CI for builds" | ||
|
||
on: | ||
push: | ||
branches: [ dev ] | ||
# | ||
# Run this action periodically to keep browsers up-to-date | ||
# even if there is no activity in this repo. | ||
# | ||
schedule: | ||
- cron: "43 2 * * 1" | ||
|
||
env: | ||
DOCKER_IMAGE: m1k1o/neko | ||
|
||
jobs: | ||
build-base: | ||
runs-on: ubuntu-latest | ||
# | ||
# do not run on forks | ||
# | ||
if: github.repository_owner == 'm1k1o' | ||
steps: | ||
- name: Check Out Repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to Docker Hub | ||
run: | | ||
docker login --username "${DOCKER_USERNAME}" --password-stdin "${DOCKER_REGISTRY}" <<< "${DOCKER_TOKEN}" | ||
env: | ||
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Build base | ||
run: | | ||
BUILD_IMAGE=${DOCKER_IMAGE} .m1k1o/build ${DOCKER_TAG} | ||
docker push ${DOCKER_IMAGE}:${DOCKER_TAG} | ||
env: | ||
DOCKER_TAG: base | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
# | ||
# do not run on forks | ||
# | ||
if: github.repository_owner == 'm1k1o' | ||
needs: [ build-base ] | ||
strategy: | ||
matrix: | ||
tags: [ firefox, chromium, google-chrome, ungoogled-chromium, tor-browser, vncviewer, vlc, xfce ] | ||
env: | ||
DOCKER_TAG: ${{ matrix.tags }} | ||
steps: | ||
- name: Check Out Repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to Docker Hub | ||
run: | | ||
docker login --username "${DOCKER_USERNAME}" --password-stdin "${DOCKER_REGISTRY}" <<< "${DOCKER_TOKEN}" | ||
env: | ||
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Build container | ||
run: | | ||
BUILD_IMAGE=${DOCKER_IMAGE} .m1k1o/build ${DOCKER_TAG} | ||
docker push ${DOCKER_IMAGE}:${DOCKER_TAG} | ||
- name: Push latest tag | ||
if: ${{ matrix.tags == 'firefox' }} | ||
run: | | ||
docker pull ${DOCKER_IMAGE}:${DOCKER_TAG} | ||
docker tag ${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_IMAGE}:latest | ||
docker push ${DOCKER_IMAGE}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters