Skip to content

Commit

Permalink
container build updates
Browse files Browse the repository at this point in the history
  • Loading branch information
b2un0 committed Aug 23, 2023
1 parent b644de0 commit b3993e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 27 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,38 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Inject slug/short variables
uses: rlespinasse/[email protected]

- name: Get build time
uses: 1466587594/get-current-time@v1
id: current-time
uses: actions/checkout@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_IMAGE }},ghcr.io/${{ github.repository }}

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Login to ghcr.io
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,linux/386,linux/arm
push: true
build-args: |
BUILD_DATE=${{ steps.current-time.outputs.time }}
VERSION=${{ github.ref_name }}
VCS_REF=${{ env.GITHUB_SHA_SHORT }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
9 changes: 0 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
FROM php:8-cli-alpine

ARG BUILD_DATE
ARG VCS_REF
ARG VERSION

ENV SCHEDULE="*/10 * * * *" \
CRON_CMD="php /app/updater.php" \
DOMAIN="" \
Expand All @@ -23,8 +19,3 @@ ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/sbin/crond", "-f"]

SHELL ["/bin/ash"]

LABEL org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.revision=${VCS_REF} \
org.opencontainers.image.revision=${VERSION} \
org.opencontainers.image.source="https://github.com/b2un0/docker-netcup-dyndns"

0 comments on commit b3993e2

Please sign in to comment.