Build Containers #3
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
--- | |
name: "Build Containers" | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Login to ghcr | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: docker build | |
run: ./var/run/docker-build.sh | |
- name: Get date | |
run: | | |
echo "DATE=$(date +'%s')" >> "$GITHUB_ENV" | |
- name: docker tag | |
run: | | |
docker tag localhost/postiz ghcr.io/githubhq/postiz-app:${{ env.DATE }} | |
docker push ghcr.io/githubhq/postiz-app:${{ env.DATE }} | |
docker tag localhost/postiz-devcontainer ghcr.io/githubhq/postiz-app:${{ env.DATE }} | |
docker push ghcr.io/githubhq/postiz-devcontainer:${{ env.DATE }} |