Skip to content

Commit

Permalink
Add GitHub Action to publish containerfiles automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
0xEAB authored Jul 12, 2024
1 parent 8a9de74 commit 6cffc3f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish-containerfiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Containerfiles
on:
push:
branches:
- 'main'

jobs:
publish-containerfiles:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: "Setup Git"
env:
SSH_KEY_64: ${{ secrets.CONTAINERFILES_SSH_KEY_64 }}
run: |
mkdir -p ~/.ssh
echo $SSH_KEY_64 | base64 --decode > ~/.ssh/id_gh
chmod 600 ~/.ssh/id_gh
echo -e "Host github.com\n\tIdentityFile=%d/.ssh/id_gh" >> ~/.ssh/config
git config user.name "dlang-dockerizer"
git config user.email "[email protected]"
- name: "Clone public Containerfiles"
run: git clone --depth=1 --branch=dlang-rox '[email protected]:dlang-dockerized/containerfiles.git' ./containerfiles
- name: "Generate Containerfiles"
run: ./ddct generate-all
- name: "Publish updated Containerfiles"
run: |
git -C ./containerfiles add -A
git -C ./containerfiles commit -m "Update containerfiles to dlang-dockerized/packaging@${GITHUB_SHA}"
git -C ./containerfiles push

0 comments on commit 6cffc3f

Please sign in to comment.