Update galaxy_build.yml #41
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 and Push Docker Image | ||
on: [push] | ||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: test | ||
run: | | ||
python ./utils/python/parse_json.py ./plugin_requirements.json | ||
- name: Get current commit ID | ||
run: echo "COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV | ||
- name: Get previous commit ID | ||
run: | | ||
PREV_COMMIT_ID=$(git rev-list --max-parents=0 HEAD | head -n 1) | ||
echo "PREV_COMMIT_ID=$PREV_COMMIT_ID" >> $GITHUB_ENV | ||
- name: Check if requirements have changed | ||
id: check_changes | ||
run: | | ||
# Überprüfen Sie, ob sich plugin_requirements.yml geändert hat | ||
dif= | ||
echo $dif | ||
CHANGED=$(git diff HEAD 'plugin_requirements.yml') | ||
if [ -z "$CHANGED" ]; then | ||
else | ||
echo "CHANGED=false" >> $GITHUB_ENV | ||
fi | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
if: CHANGED==false | ||
Check failure on line 42 in .github/workflows/galaxy_build.yml GitHub Actions / Build and Push Docker ImageInvalid workflow file
|
||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: my-docker-hub-namespace/my-docker-hub-repository | ||
- name: Build and push Docker image | ||
id: push | ||
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: jipodhead/ilohelper-coll:latest | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||