Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to inherit secrets #14

Merged
merged 1 commit into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-homarr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ jobs:
architecture: ${{matrix.architectures}}
branch_name: ${{github.event.pull_request.base.ref}}
is_merged: ${{github.event.pull_request.merged}}
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/build-tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ jobs:
architecture: ${{matrix.architectures}}
branch_name: dev
is_merged: false
secrets: inherit
22 changes: 12 additions & 10 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ on:
is_merged:
required: true
type: boolean
secrets:
HOMELAB_LXC_EP:
required: true
HOMELAB_LXC_TOKEN:
required: true
RCLONE_CONFIG:
required: true
RCLONE_CONFIG_PASS:
required: true

jobs:
image-build:
Expand Down Expand Up @@ -61,23 +70,16 @@ jobs:
if: github.event_name == 'schedule' || (inputs.branch_name == 'main' && inputs.is_merged == true)
run: |
cat << EOF > /tmp/rclone.conf
[cloudflare]
type = s3
provider = Cloudflare
access_key_id = $R2_ACCESS_KEY_ID
secret_access_key = $R2_SECRET_ACCESS_KEY
endpoint = $R2_ENDPOINT
region = auto
$RCLONE_CONFIG
EOF
echo
rclone copy ./${{inputs.app_name}}-${{inputs.app_version}}-${{inputs.architecture}}-root.tar.xz cloudflare:lxc-images --config /tmp/rclone.conf
rclone copy ./${{inputs.app_name}}-${{inputs.app_version}}-${{inputs.architecture}}-meta.tar.xz cloudflare:lxc-images --config /tmp/rclone.conf
echo
echo 'LXC Image published successfully !'
env:
R2_ACCESS_KEY_ID: ${{secrets.R2_ACCESS_KEY_ID}}
R2_SECRET_ACCESS_KEY: ${{secrets.R2_SECRET_ACCESS_KEY}}
R2_ENDPOINT: ${{secrets.R2_ENDPOINT}}
RCLONE_CONFIG: ${{secrets.RCLONE_CONFIG}}
RCLONE_CONFIG_PASS: ${{secrets.RCLONE_CONFIG_PASS}}

- name: Publish build info
if: github.event_name == 'schedule' || (inputs.branch_name == 'main' && inputs.is_merged == true)
Expand Down