Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtakagi authored May 5, 2022
1 parent b221ca3 commit 5411e5d
Showing 1 changed file with 16 additions and 27 deletions.
43 changes: 16 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,23 @@
name: Build and Push Image

on:
schedule:
# 毎日 09:00 JST
- cron: "0 0 * * *"
create:
tags:
- '*'

workflow_dispatch:

env:
DOCKER_REGISTRY_NAME: ghcr.io
DOCKER_IMAGE_NAME: ${{ github.repository }} # {username|org}/waterfall
DOCKER_IMAGE_NAME: ${{ github.repository }} # {username|org}/paper

jobs:
build:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set current datetime as env variable
env:
TZ: 'Asia/Tokyo'
run: echo "RELEASE_DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.RELEASE_DATE }}
release_name: ${{ env.RELEASE_DATE }}
body: |
Daily Build and Release.
draft: false
prerelease: false

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
Expand All @@ -45,16 +27,23 @@ jobs:
with:
registry: ${{ env.DOCKER_REGISTRY_NAME }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ github.token }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_REGISTRY_NAME }}/${{ env.DOCKER_IMAGE_NAME }}

- name: Build & Push
uses: docker/build-push-action@v2
env:
DOCKER_BUILDKIT: 1
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ env.RELEASE_DATE }}
labels: ${{ env.RELEASE_DATE }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: ${{ env.DOCKER_REGISTRY_NAME }}/${{ env.DOCKER_IMAGE_NAME }}:latest
build-args: BUILDKIT_INLINE_CACHE=1
build-args: BUILDKIT_INLINE_CACHE=1

0 comments on commit 5411e5d

Please sign in to comment.