ci: build latest and date tags
This commit is contained in:
20
.github/workflows/ghcr-push.yml
vendored
20
.github/workflows/ghcr-push.yml
vendored
@@ -21,14 +21,20 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
name: Checkout
|
name: Checkout
|
||||||
|
|
||||||
|
- name: Set Environment
|
||||||
|
run: |
|
||||||
|
echo "SLUG=ghcr.io/cwpearson/clang-format-16" >> $GITHUB_ENV
|
||||||
|
echo "DATE=$(date +"%Y%m%d")" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
docker build -f clang-format-16.dockerfile -t ghcr.io/cwpearson/clang-format-16:latest .
|
docker build -f clang-format-16.dockerfile -t "$SLUG:latest" -t "$SLUG:$DATE" .
|
||||||
|
|
||||||
- name: Publish to GHCR
|
- name: Publish to GHCR
|
||||||
run: |
|
run: |
|
||||||
echo '${{secrets.GHCR_TOKEN}}' | docker login ghcr.io -u cwpearson --password-stdin
|
echo '${{secrets.GHCR_TOKEN}}' | docker login ghcr.io -u cwpearson --password-stdin
|
||||||
docker push ghcr.io/cwpearson/clang-format-16:latest
|
docker push "$SLUG:latest"
|
||||||
|
docker push "$SLUG:$DATE"
|
||||||
build-8:
|
build-8:
|
||||||
name: Build + Publish 8
|
name: Build + Publish 8
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -40,11 +46,17 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
name: Checkout
|
name: Checkout
|
||||||
|
|
||||||
|
- name: Set Environment
|
||||||
|
run: |
|
||||||
|
echo "SLUG=ghcr.io/cwpearson/clang-format-8" >> $GITHUB_ENV
|
||||||
|
echo "DATE=$(date +"%Y%m%d")" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
docker build -f clang-format-8.dockerfile -t ghcr.io/cwpearson/clang-format-8:latest .
|
docker build -f clang-format-8.dockerfile -t "$SLUG:latest" -t "$SLUG:$DATE" .
|
||||||
|
|
||||||
- name: Publish to GHCR
|
- name: Publish to GHCR
|
||||||
run: |
|
run: |
|
||||||
echo '${{secrets.GHCR_TOKEN}}' | docker login ghcr.io -u cwpearson --password-stdin
|
echo '${{secrets.GHCR_TOKEN}}' | docker login ghcr.io -u cwpearson --password-stdin
|
||||||
docker push ghcr.io/cwpearson/clang-format-8:latest
|
docker push "$SLUG:latest"
|
||||||
|
docker push "$SLUG:$DATE"
|
||||||
|
Reference in New Issue
Block a user