mirror of https://github.com/1N3/Sn1per.git
40 lines
1010 B
YAML
40 lines
1010 B
YAML
name: build and push
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- gh-action
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 'Checkout GitHub Action'
|
|
uses: actions/checkout@main
|
|
|
|
- name: 'Login to GitHub Container Registry'
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{github.actor}}
|
|
password: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
- name: name1
|
|
run: |
|
|
echo 1
|
|
echo 2
|
|
echo 3
|
|
- name: downcase REPO
|
|
run: |
|
|
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
|
|
|
|
- name: 'Build Inventory Image'
|
|
env:
|
|
REPO_NAME: '${{ github.event.repository.name }}'
|
|
run: |
|
|
echo "OWNER_LC=${github.event.repository.name,,}" >>${GITHUB_ENV}
|
|
echo {OWNER_LC}: ${OWNER_LC}
|
|
# docker build . -f Dockerfile.base --tag ghcr.io/abnerrizzi/${REPO_NAME}:latest
|
|
# docker push ghcr.io/abnerrizzi/${REPO_NAME}:latest
|