-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to a more maintained image (#460)
* Switch to a more maintained image * removed caching * sha * images * matrix * dumps
- Loading branch information
Showing
13 changed files
with
182 additions
and
73 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 |
---|---|---|
|
@@ -10,3 +10,4 @@ node_modules/ | |
package.json | ||
yarn.lock | ||
.yarn | ||
.env* |
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
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 |
---|---|---|
|
@@ -2,13 +2,26 @@ name: Docker Build | |
|
||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
- edited | ||
- synchronize | ||
- unlabeled | ||
branches: | ||
- main | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
cancel-previous: | ||
name: Cancel Previous | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
# Run tests. | ||
# See also https://docs.docker.com/docker-hub/builds/automated-testing/ | ||
build: | ||
|
@@ -18,25 +31,48 @@ jobs: | |
max-parallel: 1 | ||
matrix: | ||
image: [odin, valheim] | ||
include: | ||
- image: odin | ||
push: true | ||
- image: valheim | ||
push: ${{ contains(github.event.pull_request.labels.*.name, 'canary') }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: mbround18 | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: crazy-max/ghaction-docker-meta@v3 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
mbround18/${{ matrix.image }} | ||
# generate Docker tags based on the following events/attributes | ||
tags: | | ||
type=sha | ||
- name: Build ${{ matrix.image }} | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
file: ./Dockerfile.${{ matrix.image }} | ||
push: false | ||
tags: mbround18/${{ matrix.image }}:latest | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
push: ${{ matrix.push }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
"GITHUB_SHA=${GITHUB_SHA}" | ||
"GITHUB_REF=${GITHUB_REF}" | ||
"GITHUB_REPOSITORY=${GITHUB_REPOSITORY}" | ||
"ODIN_IMAGE_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}" | ||
- name: Finalization | ||
run: echo "Finalized" | ||
|
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
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 |
---|---|---|
|
@@ -7,6 +7,9 @@ jobs: | |
enforce-label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: yogevbd/[email protected] | ||
with: | ||
REQUIRED_LABELS_ANY: "major,minor,patch,internal,performance,question,release,tests,wontfix,documentation,bug,dependencies" | ||
|
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
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 |
---|---|---|
|
@@ -11,14 +11,21 @@ env: | |
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
cancel-previous: | ||
name: Cancel Previous | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
build-nd-test: | ||
name: Build & Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose | ||
- name: Lint | ||
run: cargo fmt -- --check | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose | ||
- name: Lint | ||
run: cargo fmt -- --check |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.