-
Notifications
You must be signed in to change notification settings - Fork 4
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
0 parents
commit 5638f6b
Showing
14 changed files
with
2,023 additions
and
0 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,15 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "docker" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
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: On push to main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v7" | ||
|
||
jobs: | ||
build_and_push: | ||
name: Build and push Docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Extract tag string | ||
id: git | ||
shell: bash | ||
run: | | ||
RELEASE_VERSION="dev-$(date +%s)" | ||
echo "image_tag=${RELEASE_VERSION}" >> ${GITHUB_OUTPUT} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Install buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Login to docker hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ github.token }} | ||
|
||
- name: Build and push ${{ github.repository }}:${{ steps.git.outputs.image_tag }} | ||
uses: docker/[email protected] | ||
with: | ||
platforms: ${{ env.PLATFORMS }} | ||
push: true | ||
tags: | | ||
${{ github.repository }}:${{ steps.git.outputs.image_tag }} | ||
${{ github.repository }}:development | ||
ghcr.io/${{ github.repository }}:${{ steps.git.outputs.image_tag }} | ||
ghcr.io/${{ github.repository }}:development |
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,62 @@ | ||
name: On release | ||
|
||
on: | ||
release: | ||
types: # This configuration does not affect the page_build event above | ||
- created | ||
|
||
env: | ||
PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v7" | ||
|
||
jobs: | ||
build_and_push: | ||
name: Build and push Docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Extract tag string | ||
id: git | ||
shell: bash | ||
run: | | ||
RELEASE_VERSION=${GITHUB_REF#refs/*/} | ||
echo "image_tag=${RELEASE_VERSION}" >> ${GITHUB_OUTPUT} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Install buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Login to docker hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ github.token }} | ||
|
||
- name: Build and push ${{ github.repository }}:${{ steps.git.outputs.image_tag }} | ||
uses: docker/[email protected] | ||
with: | ||
platforms: ${{ env.PLATFORMS }} | ||
push: true | ||
tags: | | ||
${{ github.repository }}:${{ steps.git.outputs.image_tag }} | ||
${{ github.repository }}:latest | ||
ghcr.io/${{ github.repository }}:${{ steps.git.outputs.image_tag }} | ||
ghcr.io/${{ github.repository }}:latest | ||
- name: Update dockerhub description | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
repository: ${{ github.repository }} | ||
short-description: ${{ github.event.repository.description }} |
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,16 @@ | ||
FROM alpinelinux/docker-cli:latest | ||
|
||
LABEL org.opencontainers.image.title=gantry | ||
LABEL org.opencontainers.image.description="Updating docker swarm services" | ||
LABEL org.opencontainers.image.vendor="Shizun Ge" | ||
LABEL org.opencontainers.image.licenses=GPLv3 | ||
|
||
RUN mkdir -p /gantry | ||
|
||
WORKDIR /gantry | ||
|
||
RUN apk add --update --no-cache curl tzdata | ||
|
||
COPY src/* /gantry | ||
|
||
ENTRYPOINT ["/gantry/entrypoint.sh"] |
Oops, something went wrong.