Create build-Frontend-a.yml
Some checks failed
Build & Push Frontend A / docker (push) Failing after 2m8s
Some checks failed
Build & Push Frontend A / docker (push) Failing after 2m8s
This commit is contained in:
46
.gitea/workflows/build-Frontend-a.yml
Normal file
46
.gitea/workflows/build-Frontend-a.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Build & Push Frontend A
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare tag (sanitize branch)
|
||||
id: prep
|
||||
shell: bash
|
||||
run: |
|
||||
BRANCH="${GITHUB_REF_NAME}"
|
||||
BRANCH="${BRANCH//\//-}"
|
||||
BRANCH="$(echo "$BRANCH" | tr '[:upper:]' '[:lower:]')"
|
||||
echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
|
||||
echo "sha=${GITHUB_SHA::12}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build & Push (branch + sha tags)
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/playground:frontend-a-${{ steps.prep.outputs.branch }}
|
||||
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/playground:frontend-a-${{ steps.prep.outputs.branch }}-${{ steps.prep.outputs.sha }}
|
||||
|
||||
- name: Also push moving main tag (only on main)
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/playground:frontend-a-main
|
||||
Reference in New Issue
Block a user