-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1c7617
commit e4eccc9
Showing
3 changed files
with
90 additions
and
45 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,36 @@ | ||
name: Test | ||
description: Test the image | ||
|
||
inputs: | ||
test-tag: | ||
required: true | ||
|
||
env: | ||
RAILS_ENV: development | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: redmine/redmine | ||
ref: master | ||
path: redmine | ||
|
||
- run: | | ||
docker volume create redmine-bundle-cache | ||
cd redmine | ||
cat <<EOS > config/database.yml | ||
development: | ||
adapter: sqlite3 | ||
database: db/development.sqlite3 | ||
EOS | ||
docker run --rm -v ${PWD}:/redmine \ | ||
-v redmine-bundle-cache:/bundle \ | ||
-p 3000:3000 \ | ||
${{ inputs.test-tag }} \ | ||
bash -c "bundle install && bin/about" | ||
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,54 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
- 'redmined' | ||
workflow_dispatch: | ||
|
||
env: | ||
TEST_TAG: redmined:test | ||
IMAGE_TAG: ghcr.io/hidakatsuya/redmined:latest | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: docker/setup-qemu-action@v3 | ||
|
||
- uses: docker/setup-buildx-action@v3 | ||
|
||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and export to Docker for testing | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
load: true | ||
tags: ${{ env.TEST_TAG }} | ||
|
||
- name: Test | ||
uses: ./.github/actions/test | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ env.IMAGE_TAG }} | ||
|
This file was deleted.
Oops, something went wrong.