Skip to content

Commit

Permalink
maybe fix actions again
Browse files Browse the repository at this point in the history
  • Loading branch information
mbund committed Dec 9, 2023
1 parent 6cc1c04 commit 43bd889
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build-bot
on:
push:

jobs:
push-ghcr:
name: Build and push image
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Generate variables
id: vars
run: |
echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
- name: Login to ghcr
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Build image
run: |
docker build \
--tag ghcr.io/${{ github.repository_owner }}/tag-bot:${{ steps.vars.outputs.date }} \
--tag ghcr.io/${{ github.repository_owner }}/tag-bot:latest \
bot
- name: Push to ghcr
run: |
docker push ghcr.io/${{ github.repository_owner }}/tag-bot:${{ steps.vars.outputs.date }}
docker push ghcr.io/${{ github.repository_owner }}/tag-bot:latest
1 change: 1 addition & 0 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
echo "matrix=$(find images -type f -name 'Dockerfile.*' | awk -F'.' '{print $2}' | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
push-ghcr:
needs: list
name: Build and push image
runs-on: ubuntu-22.04
permissions:
Expand Down

0 comments on commit 43bd889

Please sign in to comment.