-
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
cfd4fc0
commit 44470ef
Showing
8 changed files
with
103 additions
and
39 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ on: workflow_dispatch | |
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: gpg4win | ||
IMAGE_NAME: gpg | ||
|
||
jobs: | ||
build-mingw: | ||
build-gpg: | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
@@ -20,15 +20,47 @@ jobs: | |
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/windows-resource/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=edge,enable=true,branch=main | ||
flavor: | | ||
latest=true | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push-gpg: | ||
runs-on: ubuntu-latest | ||
needs: [build-gpg] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch_depth: 0 | ||
- name: Extract gpg binary tree + archive | ||
run: | | ||
mkdir -p tmp/resources/gpg | ||
docker cp $(docker create ${{ env.REGISTRY }}/${{ github.repository_owner }}/windows-resource/${{ env.IMAGE_NAME }}:latest):/opt/gpg tmp/resources/gpg/gpg | ||
cd tmp/resources/gpg | ||
tar -cz gpg > gpg.tar.gz | ||
- name: Checkout pages | ||
run: | | ||
git fetch --all | ||
git checkout -f -B pages --track origin/pages | ||
- name: Config git user | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Github Actions from commit ${{ github.sha }}" | ||
- name: Upload | ||
run: | | ||
rm -rf resources/gpg/* | ||
mv tmp/resources/gpg/gpg.tar.gz resources/gpg/gpg.tar.gz | ||
git add resources/gpg/gpg.tar.gz && git commit -m"Update gpg binary" && git push -f |
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ env: | |
IMAGE_NAME: mingw-w64 | ||
|
||
jobs: | ||
build-mingw: | ||
build-mingw-w64: | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
@@ -20,16 +20,47 @@ jobs: | |
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/windows-resource/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=edge,enable=true,branch=main | ||
flavor: | | ||
latest=true | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
push-mingw-w64: | ||
runs-on: ubuntu-latest | ||
needs: [build-mingw-w64] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch_depth: 0 | ||
- name: Extract mingw-w64 binary tree + archive | ||
run: | | ||
mkdir -p tmp/resources/mingw_w64 | ||
docker cp $(docker create ${{ env.REGISTRY }}/${{ github.repository_owner }}/windows-resource/${{ env.IMAGE_NAME }}:latest):/opt/mingw64-w64 tmp/resources/mingw_w64/mingw_w64 | ||
cd tmp/resources/mingw_w64 | ||
tar -cz mingw_w64 > mingw_w64.tar.gz | ||
- name: Checkout pages | ||
run: | | ||
git fetch --all | ||
git checkout -f -B pages --track origin/pages | ||
- name: Config git user | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Github Actions from commit ${{ github.sha }}" | ||
- name: Upload | ||
run: | | ||
rm -rf resources/mingw_w64/* | ||
mv tmp/resources/mingw_w64/mingw_w64.tar.gz resources/mingw_w64/mingw_w64.tar.gz | ||
git add resources/mingw_w64/mingw_w64.tar.gz && git commit -m"Update mingw_w64 binary" && git push -f |
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